forked from cockroachdb/pebble
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
db: simplify mergingIter.switchTo{Max,Min}Heap
Previously, mergingIter.switchTo{Max,Min}Heap had complicated logic to avoid violating the levelIter's invariants when higher-level range deletions caused cascading seek keys to extend beyond iteration bounds. With 6fa3fe9, the levelIter behaves like other internal iterators and is capable of being relative positioned away from an exhausted state without violating its bounds-checking invariants. This commit applies the same logic of 6fa3fe9 to the synthetic iterator bound keys that are interleaved when a levelIter reaches a distant bound, allowing a relative positioning method to step away from these synthetic iterator bounds. This allows us to simplify mergingIter.switchTo{Max,Min}Heap.
- Loading branch information
Showing
2 changed files
with
11 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters