Best way to delete data in LevelDB?

137 views
Skip to first unread message

Jim

unread,
Jan 25, 2015, 5:41:26 PM1/25/15
to lev...@googlegroups.com
I have a time-series type data requirement I'm trying to potentially model out in LevelDB for the insert speed. I'm looking at needing 40-50K inserts per second per node. After 20 days that data becomes less valuable and I can get rid of it from this storage system. Assuming I'm writing 500MB-1TB a day on average what's the best way to model keys in leveldb to allow for efficient deletes or to apply a "ttl" type attribute. From my reading it seems LevelDB doesn't have a TTL type setting. Do I need to store a reverse index of year-dayofyear-key that just has all the keys that I've stored for that day then have a job that runs and does deletes one by one from that reverse index?

thanks!

Ren Z

unread,
Apr 9, 2015, 9:59:53 AM4/9/15
to lev...@googlegroups.com
The easiest way to delete is to delete entire database. You may wish for example to write to a new db every day.
Reply all
Reply to author
Forward
0 new messages