Expired items still appear in the document list
Tue, 10/30/2012 - 05:38
I am experimenting with expiration and views with Couchbase 2.0. I insert a bunch of items with a lifetime of 1 min but several minutes later I can still see them in the Documents view for the bucket. If I select one to edit though it is unavailable: Error: notfound (Document does not exist).
I also notice that the views I have defined on top of this data are also not updated - i.e. the derived aggregated data doesn't reflect the fact that the documents have expired. This happens even if I set the Stale property to false.
Can anybody clarify what the expected behaviour is here?
Hello Simon,
This is a known issue that has been capture in Couchbase JIRA ( http://www.couchbase.com/issues/browse/MB-6219 / http://www.couchbase.com/issues/browse/MB-7053 ). You can find more information in the comments of these JIRA.
Some key points :
- When an item expires, this occurs in the cache, and the views are built from the index/items that are in the database (on the disk)
- So the view will only see this change once the "expiration" is sent to the database store itself.
So you can speed up the deletion from the index. To do this you need to change the "Expiry Pager Sleeptime" to a smaller value.
See the cbepctl documentation for this:
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-admin-cmdli...
Regards
Tug
Tug
@tgrall