-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sstable: fix two-level monotonic bounds bug
This commit fixes a sstable iterator bug surfaced by the metamorphic test in the issue #2816. In the circumstances of this bug, a two-level sstable iterator with monotonically advanced bounds could reuse the wrong index block if a previous block was excluded due to a block-property filter. An accompanying regression unit test is added too. Additionally, it refactors some additional sstable tests to run against more table formats and automatically against newly introduced table formats. While this commit is sufficient to fix the bug, in subsequent work I anticipate refactoring and tightening invariants. This refactoring will not be suitable for a backport, so this commit first resolves the bug in a backportable way.
- Loading branch information
Showing
11 changed files
with
306 additions
and
106 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
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
2 changes: 1 addition & 1 deletion
2
sstable/testdata/reader_bpf/iter → sstable/testdata/reader_bpf/Pebblev2/iter
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Test case for bug https://github.com/cockroachdb/pebble/issues/2036 Build | ||
# sstable with two-level index, with two data blocks in each lower-level index | ||
# block. | ||
build | ||
build block-size=1 index-block-size=40 print-layout=true | ||
[email protected]:cAT10 | ||
[email protected]:dAT7 | ||
[email protected]:eAT15 | ||
|
Oops, something went wrong.