Riak Client Resources, Deleting a Key Doesn't Remove it from bucket.keys
kelly at basho.com
Tue May 22 11:58:33 EDT 2012
Hi Steve. There is no caching of key lists in riak. What you are seeing is likely the fact that listing of keys or index queries can pick up deleted keys due to the fact that riak keeps tombstone markers around for deleted objects for some period. For a really good explanation of riak's delete behavior check out this writeup by Jon Meredith: http://lists.basho.com/pipermail/riak-users_lists.basho.com/2011-October/006048.html. You can set delete_mode to immediate as described in that post and you will most likely not see any deleted keys when you do an index query or key list. The tradeoff is that you may get the unexpected behavior when doing concurrent updates to the same set of keys that the delete_mode changes were designed to address as Jon also indicates in that post. We are considering different options on this front, but at this time no actual changes have been made to address this.
On May 20, 2012, at 10:13 AM, Steve Warren wrote:
> The last message I saw on this (from a year ago) says the caching of key lists will be removed. I just ran into it while running a $key index range search. I then ran a ?key=stream search on the bucket and the same stale key list appeared (I had created a bunch of data and then deleted it as a test). Did the caching removal not happen? I'm running 1.1.2
> The query:
> curl 'localhost:8098/buckets/testbucket/index/$key/0/g'
> As others have noted, this behavior is quite disconcerting and I don't want to pepper the application with otherwise unnecessary checks for stale keys even on 2i range queries. Or is that unavoidable?
> riak-users mailing list
> riak-users at lists.basho.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users