I am considering a custom modification where sequence numbers are actually
timestamps. I would use this to automatically prune older records during
compactions. New sequence numbers would be generated like this:
cur_time=env->NowMicros();
if (cur_time<=version->LastSequence)
++version->LastSequence;
else
version->LastSequence=cur_time;
return(version->LastSequence);
No, this is not the exact code … just the concept. The "then" branch handles
case where multiple writes happen within the resolution of the clock. And I
might create a NowNanos() just to reduce that too.
I believe snapshots and such would work as is. Then I only have to add logic
to the block iterators to skip old stuff.
Thoughts??
Original issue reported on code.google.com by mvonmasz...@gmail.com on 13 Aug 2014 at 9:38
Original issue reported on code.google.com by
mvonmasz...@gmail.com
on 13 Aug 2014 at 9:38