toplingdb
toplingdb copied to clipboard
Add WBWIIterator to MergingIterator
Now Transaction DB use BaseDeltaIterator, but it needs compare base_iter key and delta_iter key on each Next()/Prev(), this waste CPU.
We can add delta iter to the (heap of) underlying MergingIterator of DBIter, thus improving performance -- delta iter is unlikely going to heap top.
Unfortunately, BeginTransaction() does not alloc a seq num, this makes WBWIIterator can not take a seq num as virtual seq num to be used by MergingIterator's heap comparator.