key garbage collection

Justin Karneges justin at
Thu Nov 3 13:51:48 EDT 2011

On Thursday, November 03, 2011 12:49:06 AM you wrote:
> On Thu, Nov 3, 2011 at 02:39, Justin Karneges <justin at> wrote:
> > So far so good.  Now for handling cleanup.  Periodically, we scan the
> > "cleanup" bucket for keys to process.  Since keys only exist in this
> > bucket at the moment of a write (they are deleted immediately
> > afterwards), in practice there should hardly be any keys in here at any
> > single point in time.  We're talking single digits here.  Much better
> > than a full db scan to find garbage keys.  Also, the keys to process can
> > be narrowed down by time (e.g. > 5 minutes ago) based on the key name.
> This will minimize your scans, but not eliminate them. You may not be
> able to write to the "cleanup" bucket because you've lost all network
> connectivity to the Riak cluster. Not a bad assumption, given that you
> could not write out B (what makes you think you could write to
> "cleanup"?).

The cleanup key is written first.  If that write fails to acknowledge, then the 
overall write process would abort.  It should not be possible to have only the 
A key and no cleanup key.


More information about the riak-users mailing list