Nightly Prune

Chad Engler Chad.Engler at
Thu Feb 7 10:52:34 EST 2013

We need records in our database to only live for a certain period of
time (and we are using Bitcask). At first glance, expiry_secs seems to
be exactly what we are looking for.


The problem is, these records need to be pruned when they are older than
10 days *according to date information in the record*, not the time that
it was inserted. Many times we will repost events and things from the
day before or a week before into riak. So if a week old entry goes in,
it should only live for 3 more days before being pruned.


I've noticed that people are saying map reduces over large buckets are
not recommended for things like this, so what is a good way to prune off
old entries when they are over 10 days old (according to date data
within the record)? Please also note we will have 2 - 3 million keys in
a single bucket, which needs to be pruned along with 200,000 - 250,000
keys in another bucket that also need to be pruned.




Chad Engler

Telephony Programmer


1.800.775.7790 x746

chad.engler at <mailto:chad.engler at> 


Hosted Communications | Friendly Service


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list