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: fix skipped key during Prev at synthetic range key marker
During forward seek calls (SeekGE, SeekGEWithLimit, SeekPrefixGE) on an iterator that includes range keys, the Pebble iterator will stop at the search key if there exists a range key straddling the search key. If there's no coincident point key at the same position, this introduces an 'ephemeral' iterator position that only exists after the seek. If the user Prev'd while positioned over an 'ephemeral' iterator position, the underlying internal iterator would mistakenly be Prev'd twice, skipping a key. This change alters the logic around when to Prev twice, avoiding the second Prev if the exposed iterator position is ephemeral.
- Loading branch information
Showing
2 changed files
with
52 additions
and
1 deletion.
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