-
Notifications
You must be signed in to change notification settings - Fork 457
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
db: avoid stepping beyond iteration prefix in levelIter
During prefix iteration mode, avoid stepping the levelIter beyond the current iteration prefix. This fixes a bug whereby a levelIter.Next may position a levelIter to a file beyond the iteration prefix and a subsequent SeekPrefixGE to a later key with TrySeekUsingNext would fail to observe keys in the skipped file. Fix #3610.
- Loading branch information
Showing
4 changed files
with
82 additions
and
36 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -336,3 +336,29 @@ seek-prefix-ge c@9 | |
---- | ||
. | ||
. | ||
|
||
# Regression test for #3610. | ||
# | ||
# Similar to the above case, this test consists of two SeekPrefixGEs for | ||
# ascending keys, resulting in TrySeekUsingNext()=true for the second seek. | ||
# Previously, during the first SeekPrefixGE the mergingIter could Next the | ||
# levelIter beyond the file containing point keys relevant to both seeks. | ||
|
||
define bloom-bits-per-key=100 | ||
L4 | ||
[email protected]:b@0 | ||
L5 | ||
[email protected]:b@1 | ||
[email protected]:c@3 | ||
---- | ||
L4: | ||
000004:[b@0#10,SET-b@0#10,SET] | ||
L5: | ||
000005:[b@8#3,RANGEDEL-c@3#0,SET] | ||
|
||
combined-iter | ||
seek-prefix-ge b@10 | ||
seek-prefix-ge c@10 | ||
---- | ||
b@0: (b@0, .) | ||
c@3: (c@3, .) |