Wednesday, September 26, 2012

RavenDB Expiration Bundle

In RavenDB there is an expiration bundle.  This is great, think of it as a document retention policy.  Delete me in 90 days from now.  There is an issue in build 960 when you have both replication and expiration bundles installed.  Save ten documents test/1, test/2, and so on.  Set the expiration for 1 minute from now.

In Silverlight you will see the documents, but in 60 seconds you won’t.  The collection will still show a count of 10 documents.  Not the end of the world, the app still works, and no one can READ the documents that have expired.  But they still exist, they will be delete later.

Suppose you want to see the expired documents using the Expired Docs index.  Can’t the Read task prevents this from happening.  They are there and indexed, but there is a trigger that is preventing reads from happening.

This issue is fixed in the next release, but if you have a bunch of deletes on a large data set… it will be interesting to see if the counts are still a bit off in the admin console, possibly even query counts for pagination, just until the index catches up.

No comments:

Post a Comment