Removing revisions from RavenDB

442 views
Skip to first unread message

Micha Schopman

unread,
Feb 15, 2012, 8:48:23 AM2/15/12
to ravendb
I just upgraded to the latest stable build, copied the data folder,
and created the plugins folder under Server but copied the
Raven.Versioning.Client.dll instead of the
Raven.Bundles.Versioning.dll. #yup #fail

The result is that RavenDB now has consolidated all revisions into the
normal collection of documents. So instead of 100 documents, I now
have 100 * revisions. After I corrected my mistake, I see that the
versioning trigger is present in the RavenDB Studio UI but the damage
has already been done.

So my first thought was, yeah baby ... patch....just delete the
revisions. However..... as (also stated in the documentation) I
cannot remove revisions.

"Raven.Database.Exceptions.OperationVetoedException: PUT vetoed by
Raven.Bundles.Versioning.Triggers.VersioningPutTrigger because:
Modifying a historical revision is not allowed"

There are actually two question in this:
a) Is there a way to escape RavenDB's parental restrictions with
versioning ;)
b) Since the document ID's have not been changed, shouldn't the
versioning bundle just take care of this? Maybe my approach is just
wrong.

Oren Eini (Ayende Rahien)

unread,
Feb 15, 2012, 3:37:09 PM2/15/12
to rav...@googlegroups.com
a) No, by design :-)
You can remove the versioning bundle, then go ahead and do that.

b) I am pretty sure that what happens is that you are now seeing revisions in the queries, right?
This is happening because during indexing, the versioning bundle wasn't there to filter them.
You can reset the indexes and see this go away

Micha Schopman

unread,
Feb 16, 2012, 7:06:37 AM2/16/12
to ravendb
You're awesome, killing the Raven/DocumentsByEntityName index, and
restarting RavendB solved this immediately.The revisions are now in
the original state.

Playing again.... :)

On Feb 15, 9:37 pm, "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
wrote:
Reply all
Reply to author
Forward
0 new messages