Renaming item to a Deleted item's name

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

ddouty@welis.com
Posts: 4
Joined: Fri Feb 06, 2009 3:31 pm

Renaming item to a Deleted item's name

Post by ddouty@welis.com » Mon Jul 20, 2009 6:35 am

When I deleted a file and then renamed another file to the same name, I always receive this error when I try to check-in this file after I checked it out.
"Item $/Ascent/Components/Concepts/Nationwide/CDeferral.vb caused the transaction to fail: An item with the same name or object id already exists in the selected folder.
[7/20/2009 8:26:37 AM] Transaction failed"

How can I eliminate this error. Obviously the database is confused with using the name of a deleted item. This also occurs if I try to add a file to a folder with the same name as a deleted item.

ddouty@welis.com
Posts: 4
Joined: Fri Feb 06, 2009 3:31 pm

Re: Renaming item to a Deleted item's name

Post by ddouty@welis.com » Mon Jul 20, 2009 7:17 am

I fixed the problem by manually deleting the Vault cache on my machines. This is a problem you guys should address in your code.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Renaming item to a Deleted item's name

Post by Beth » Mon Jul 20, 2009 8:55 am

Did the delete get committed? Take a looking at your Pending Changes.

I can't reproduce the issue here. Can you make this issue happen more than once? If so, then I'd like to find out more information.
Beth Kieler
SourceGear Technical Support

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Re: Renaming item to a Deleted item's name

Post by davenovak » Wed Jul 22, 2009 9:52 am

I've seen a number of issues exactly like that where a server error is not correctly handled by the Vault client. As a result, the client caches info that does not agree with the server and future operations fail (generally because the cached client tree and the actual server tree do not match). Worse yet, going to Tools -> Options -> Local Files -> Cache Location and clicking the Reset Repository Cache never seems to fix the problem. Instead, the only way to fix the broken Vault Client is to Open Cache Folder, down through Vault_1\Client and delete all folders that look like GUIDs. Though this "works", it means that you also have to set the working folder for those repositories and possible re-configure other settings.

Though I have not been able to consistently reproduce this problem, I've seen it show up with failed renames and failed deletes quite a bit. Whenever the server throws an error, I'm now always concerned that the Vault Client did not robustly handle the exception. I've even seen cache-related issues prevent users from actually logging into their repositories. If only Reset Repository Cache fixed this, it wouldn't be so bad. But having to explain to users that they must manually delete their cache is clearly not acceptable.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Renaming item to a Deleted item's name

Post by Beth » Wed Jul 22, 2009 4:58 pm

davenovak: Take a look at the change set. Are your renamed or deleted items listed there? If they are, then select them and hit your delete key. What you may be doing when you clear the cache is essentially the same thing, and it would be better to just remove them from the pending check-ins. If they are sitting in your pending check-ins, then they are listed in your cache in CacheMember_ChangeSetItems.
Beth Kieler
SourceGear Technical Support

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Renaming item to a Deleted item's name

Post by Beth » Wed Jul 22, 2009 5:06 pm

davenovak: Also, we discussed what you mentioned on the reset cache button a bit. I'm going to put in a feature request to add more functionality to that button so that it's a little more like clearing the cache.

Also, when you do clear your cache, you can always keep cachemember_workingfolderassignments. There are a few more details about getting more granular in what parts of the cache to deal with between these two KB articles:
Beth Kieler
SourceGear Technical Support

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Re: Renaming item to a Deleted item's name

Post by davenovak » Thu Jul 23, 2009 9:09 am

Yes, my renamed or deleted items were listed on the Pending Change Set tab (as are all failed transactions), though by practice I always remove such entries. Even so, I often see my local cache get messed up in the process. And again, the only fix is to manually delete the repository cache.

Short of actually fixing such bugs, I'd like to at least see that Reset Repository Cache do the same thing as manually deleting the local cache (except it should be smart and know what files are safe to keep). Any way to make problem resolution easier for the user would be beneficial.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Renaming item to a Deleted item's name

Post by Beth » Fri Jul 24, 2009 10:16 am

Your cache shouldn't be messing up on a regular basis like that. It might be good for us to take a look at it. If you would like to look in depth more at that, send an email to support at sourcegear.com (attn: Beth) with a link to this forum thread.

I have logged a request to change the behavior of the Reset Repository Cache button
F: 14673
Beth Kieler
SourceGear Technical Support

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Re: Renaming item to a Deleted item's name

Post by davenovak » Fri Jul 24, 2009 10:58 am

I'm not sure that it happens "regularly", but has happened and still does pop up every now and again. I'd say once or twice a month someone on the team (of 50) has a client-related problem and the only "solution" is to manually delete the cache.

I would be very grateful if Reset Repository Cache was able to resolve such issues.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Renaming item to a Deleted item's name

Post by Beth » Mon Jul 27, 2009 9:37 am

Do you know if you can make the issue with delete items happen?
Beth Kieler
SourceGear Technical Support

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Re: Renaming item to a Deleted item's name

Post by davenovak » Mon Jul 27, 2009 9:53 am

If you're asking if I'm able to reproduce the original issue in this post, no I am not. However, I have seen this exact same issue before and was bitten by it myself long ago (just not recently). So, perhaps renaming to a deleted name works as desired under 4.1.4. Nevertheless, even using 4.1.4, we still have cache issues pop up from time to time.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Renaming item to a Deleted item's name

Post by Beth » Mon Jul 27, 2009 1:43 pm

If you would like, I can investigate your cache issue further. Just send an email to support at sourcegear.com (attn: Beth) with a link to this forum thread, and we can continue on from there.
Beth Kieler
SourceGear Technical Support

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Re: Renaming item to a Deleted item's name

Post by davenovak » Mon Jul 27, 2009 1:57 pm

Unfortunately, without "reproducible steps", I don't think we'll get far, so I'll have to pass. I know that the problem happens (even under 4.1.4), but I don't know how it happens. I would just like to see the requested change for Reset Repository Cache be implemented (a request which you have already logged).

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Renaming item to a Deleted item's name

Post by Beth » Mon Jul 27, 2009 3:14 pm

Yup, I have it logged. It's a good request.

The kinds of things I've seen cause problems with the cache for users would be intermittent network connection issues. If a cache is getting data from the server and the communication is cut off, the cache might not get what it needs. The other kind of thing I've seen is just the occasional strange set of steps that didn't seem to make sense or was just some case we never thought of before. Once we know of those cases, then we can better deal with them.
Beth Kieler
SourceGear Technical Support

marvinpjr
Posts: 1
Joined: Thu Jul 22, 2010 12:24 pm

Re: Renaming item to a Deleted item's name

Post by marvinpjr » Thu Jul 22, 2010 12:28 pm

Beth wrote:davenovak: Take a look at the change set. Are your renamed or deleted items listed there? If they are, then select them and hit your delete key.
I had the same issue today. Deleted a file. Replaced it with a new one, same name. Check-ins subsequently failed. The above suggestion worked for me.

Post Reply