Vault Admin tool reporting questionable file count.

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

Moderator: SourceGear

Post Reply
Balthazor
Posts: 81
Joined: Fri Mar 11, 2005 4:10 pm
Location: Hartford, Wisconsin

Vault Admin tool reporting questionable file count.

Post by Balthazor » Mon Dec 15, 2008 7:56 pm

So here's my story. Sorry if it ends up getting lengthy. I recently moved a bunch of files from a VSS database to Vault. I did this by simply getting latest on all the files in VSS to my hard drive then adding them to the Vault repository by means of the Add Files/Folders item in the Vault client. Oh, and I made sure to delete all the awful *.scc files that Source Safe creates all over the place before adding these files to Vault. So once I was all done with that, the repository statistics page in the Vault Admin tool and the repository selection screen in the Vault client were both telling me I had 390645 files in the repository.

Then I was doing some monkeying around trying to get some files shared, and when that didn't do what I'd hoped I just deleted and obliterated all the files I'd been monkeying around with and readded them from the hard drive. That was, I believe, 37 files that were deleted and readded.

At that point I noticed that Vault was now telling me I had 390564 files in the repository. That seemed real odd to me, since I'd only deleted 37 files. Upon further investigation, I did find a handful of files that VSS had put somewhere other than where I'd expected them to go, and after readding those to Vault I had Vault telling me my file count was 390585.

I figured I'd best find out how many files were over in the original VSS repository, but since VSS doesn't provide for me (at least that I'm aware of) any simple way to see how many files exist in the database I quickly created an application that would iterate through every file in VSS and give me a count. That total was 390618.

Now it gets even stranger. I did a similar thing with the Vault repository, wrote an app to iterate through every file and give me a count. That count was 390648.

Figuring, at that point, that something was amiss, I wrote yet another app which would iterate through every file in VSS and verify that each file existed in Vault, and vice-versa. That came up with precisely 0 differences.

Now, I'm perfectly happy to take that 0 differences and run with it. I mean, I'm reasonably confident that all files are present and accounted for. But I'm still a little concerned about these strange numeric discrepancies. I realize that this is a pretty vague question, but can anyone think of anything, anything at all, which could account for what I've been seeing here?

And no, I'm not ruling out the possibility that I'm simply losing my mind.

By the way, I'm on Vault version 4.1.3

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Vault Admin tool reporting questionable file count.

Post by lbauer » Tue Dec 16, 2008 11:14 am

What was the final statistics count in Vault?

Was it less than the file count you got, or more?

I've noticed that Vault does not count shared files multiple times in the statistics.
Linda Bauer
SourceGear
Technical Support Manager

Balthazor
Posts: 81
Joined: Fri Mar 11, 2005 4:10 pm
Location: Hartford, Wisconsin

Re: Vault Admin tool reporting questionable file count.

Post by Balthazor » Tue Dec 16, 2008 1:59 pm

lbauer wrote:What was the final statistics count in Vault?

Was it less than the file count you got, or more?

I've noticed that Vault does not count shared files multiple times in the statistics.
The final Statistics count is 390585. The count I got with my program iterating through all Vault files was 390648.

I noticed that with the shared files too. Only, right now, there should be no shared files in Vault.

Balthazor
Posts: 81
Joined: Fri Mar 11, 2005 4:10 pm
Location: Hartford, Wisconsin

Re: Vault Admin tool reporting questionable file count.

Post by Balthazor » Tue Dec 16, 2008 2:13 pm

So it would seem that the value shown by the Statistics must be coming from the tblrepositories.filecount, so I'm guessing that this value somehow got out of sync with what the actual number of files is. So now I'd be wondering if there's any way to "resync" that value without manually editing the database?

Balthazor
Posts: 81
Joined: Fri Mar 11, 2005 4:10 pm
Location: Hartford, Wisconsin

Re: Vault Admin tool reporting questionable file count.

Post by Balthazor » Tue Dec 16, 2008 3:26 pm

AHA! I hate to say it, but I think I've found a bug.

I created a new repository, so the filecount on that repository was 0. I created two folders and added a file to one of those folders. now the filecount is 1. Then I shared the file to the other folder. The filecount is still 1. Now I deleted the shared file. The filecount dropped to 0. Then I deleted the original file and my filecount went to -1. So it seems that the system decrements the filecount when shared files are deleted even though those shared files are not included in the filecount.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Vault Admin tool reporting questionable file count.

Post by lbauer » Fri Dec 19, 2008 1:06 pm

Yes, that does sound like a bug. I'll log it.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply