toplingdb icon indicating copy to clipboard operation
toplingdb copied to clipboard

Add WBWIIterator to MergingIterator

Open rockeet opened this issue 2 years ago • 1 comments

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.

rockeet avatar Aug 16 '23 04:08 rockeet

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.

rockeet avatar Aug 17 '23 06:08 rockeet