RDMS - Counts "off" when using versioning bundle

30 views
Skip to first unread message

Kijana Woodard

unread,
Jul 16, 2012, 12:59:02 PM7/16/12
to rav...@googlegroups.com
I will investigate further and open a ticket if this is not a known issue.

I'm using 960 with the Versioning bundle. If I create documents, delete some, and add new ones, the document counts on the Collections view of Management Studio include the deleted docs. My guess is that the revision docs are still there inflating the counts. 

I don't plan on doing a lot of deletion in production, but development is a bit awkward when I want to blow away some docs.

Is this a known issue or by design? Otherwise, I'll open an issue.

p.s. Still chuckling at the acronym for management studio.

Oceanswave

unread,
Jul 16, 2012, 1:04:24 PM7/16/12
to rav...@googlegroups.com
Actually, I think when using the Versioning bundle, if you delete a document, the revision documents are still around.

Try navigating to <TheDeletedDocumentId>/revisions/ in RDMS + Go To Document and see if they're there/autocomplete.

I just went through a process of 'cleaning up' deleted docs with revisions by using the Advanced/StartsWith and purging all revision docs.


I'm on an unstable release, so I'm not sure if this applies to stable.

Kijana Woodard

unread,
Jul 16, 2012, 1:10:36 PM7/16/12
to rav...@googlegroups.com

Yeah. my assumption was that the revision docs are responsible. I can see them on the documents view. I'm just wondering whether the behavior is desirable.

Oceanswave

unread,
Jul 16, 2012, 1:11:05 PM7/16/12
to rav...@googlegroups.com
This might be desired behavior btw, because you get version history even if a document is deleted.

I think that it behaves appropriately if you create a new document with the id of an existing document. i.e. the existing revisions of the deleted document will always be historical.


Maybe I'm just coming to terms with this myself and you already knew all this ---- each revision document then would serve to inflate the counts since there really are that many documents, but some of them are 'hidden'. maybe this is wrong/right.

Kijana Woodard

unread,
Jul 16, 2012, 1:14:38 PM7/16/12
to rav...@googlegroups.com

Right. The collection count says N, but when you click on it you, see N-deleted docs.

Oceanswave

unread,
Jul 16, 2012, 1:43:28 PM7/16/12
to rav...@googlegroups.com
Got 'ya.

Yeah, what you say seems appropriate, the collection count and the number of items displayed should be consistent...

if the intent is to indicate that there are 'ghost' documents, then that count should be called out explicitly elsewhere.

Oren Eini (Ayende Rahien)

unread,
Jul 17, 2012, 4:34:07 AM7/17/12
to rav...@googlegroups.com
Versioned documents do NOT take part in indexing
They should NOT show up in collection count.

They DO take part of the total number of documents in the DB, though.

Kijana Woodard

unread,
Jul 18, 2012, 11:56:28 AM7/18/12
to rav...@googlegroups.com
v960 with Versioning Bundle.

            var foos = new List<Foo>
                       {
                           new Foo(),
                           new Foo(),
                           new Foo()
                       };

            foos.ForEach(RavenSession.Store);
            RavenSession.SaveChanges();

            RavenSession.Delete(foos[0]);
            RavenSession.SaveChanges();

I get this:
Inline image 1


I've left similar entities in the db overnight to see if the count would get updated. It didn't. I also tried restarting management studio and the server.

If I remove the plugins, I get this:

Inline image 2
image.png
image.png

Kijana Woodard

unread,
Jul 18, 2012, 2:49:01 PM7/18/12
to rav...@googlegroups.com
image.png
image.png
Reply all
Reply to author
Forward
0 new messages