-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage: don't synthesize MVCC point tombstones below point keys
This patch changes `pointSynthesizingIter` (and by extension MVCC scans and gets) to not synthesize MVCC point tombstones below existing point keys, only above them. Point tombstones are still synthesized at the start bound of all MVCC range tombstones regardless. This patch only focuses on the behavioral change, and is not concerned with performance. A later patch will address performance optimizations. Even so, this can significantly improve `MVCCScan` performance with many range keys: ``` MVCCScan_Pebble/rows=10000/versions=1/valueSize=64/numRangeKeys=0-24 2.76ms ± 1% 2.78ms ± 2% ~ (p=0.274 n=8+10) MVCCScan_Pebble/rows=10000/versions=1/valueSize=64/numRangeKeys=1-24 6.34ms ± 1% 5.72ms ± 1% -9.80% (p=0.000 n=10+10) MVCCScan_Pebble/rows=10000/versions=1/valueSize=64/numRangeKeys=100-24 60.1ms ± 7% 23.6ms ± 7% -60.72% (p=0.000 n=10+10) MVCCGet_Pebble/batch=true/versions=1/valueSize=8/numRangeKeys=0-24 2.73µs ± 1% 2.72µs ± 1% ~ (p=0.268 n=9+10) MVCCGet_Pebble/batch=true/versions=1/valueSize=8/numRangeKeys=1-24 5.40µs ± 1% 5.46µs ± 1% +1.18% (p=0.001 n=10+10) MVCCGet_Pebble/batch=true/versions=1/valueSize=8/numRangeKeys=100-24 171µs ± 1% 170µs ± 1% ~ (p=0.247 n=10+10) MVCCGet_Pebble/batch=true/versions=10/valueSize=8/numRangeKeys=0-24 3.87µs ± 1% 3.85µs ± 0% -0.58% (p=0.030 n=10+9) MVCCGet_Pebble/batch=true/versions=10/valueSize=8/numRangeKeys=1-24 7.11µs ± 1% 7.24µs ± 1% +1.83% (p=0.000 n=9+10) MVCCGet_Pebble/batch=true/versions=10/valueSize=8/numRangeKeys=100-24 179µs ± 1% 178µs ± 1% ~ (p=0.063 n=10+10) MVCCGet_Pebble/batch=true/versions=100/valueSize=8/numRangeKeys=0-24 10.4µs ± 5% 10.0µs ± 3% -3.96% (p=0.013 n=10+9) MVCCGet_Pebble/batch=true/versions=100/valueSize=8/numRangeKeys=1-24 15.9µs ± 3% 16.2µs ± 3% +2.11% (p=0.007 n=10+10) MVCCGet_Pebble/batch=true/versions=100/valueSize=8/numRangeKeys=100-24 222µs ± 1% 220µs ± 2% ~ (p=0.063 n=10+10) ``` Release note: None
- Loading branch information
1 parent
a7c91f0
commit 92b5eaf
Showing
4 changed files
with
225 additions
and
116 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
Oops, something went wrong.