Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
86110: storage: use `RangeKeyChanged()` in `pebbleMVCCScanner` r=nicktrav a=erikgrinaker This patch uses `RangeKeyChanged()` in `pebbleMVCCScanner` to detect MVCC range keys and enable point key synthesis. This shows a ~5% speedup for large scans with no range keys, but a minor regression for point gets with range keys -- the latter caused by having to call both `HasPointAndRange()` and `RangeKeyChanged()`, while previously only the first was called. ``` name old time/op new time/op delta MVCCScan_Pebble/rows=1/versions=1/valueSize=64/numRangeKeys=0-24 5.62µs ± 2% 5.68µs ± 1% ~ (p=0.058 n=10+8) MVCCScan_Pebble/rows=1/versions=1/valueSize=64/numRangeKeys=1-24 12.2µs ± 3% 12.3µs ± 1% ~ (p=0.113 n=10+9) MVCCScan_Pebble/rows=100/versions=1/valueSize=64/numRangeKeys=0-24 38.9µs ± 1% 38.5µs ± 1% -0.78% (p=0.019 n=9+9) MVCCScan_Pebble/rows=100/versions=1/valueSize=64/numRangeKeys=1-24 72.1µs ± 2% 72.7µs ± 2% +0.83% (p=0.043 n=10+10) MVCCScan_Pebble/rows=10000/versions=1/valueSize=64/numRangeKeys=0-24 2.85ms ± 1% 2.72ms ± 1% -4.63% (p=0.000 n=9+10) MVCCScan_Pebble/rows=10000/versions=1/valueSize=64/numRangeKeys=1-24 5.46ms ± 1% 5.48ms ± 1% ~ (p=0.065 n=9+10) MVCCGet_Pebble/batch=true/versions=1/valueSize=8/numRangeKeys=0-24 3.34µs ± 1% 3.33µs ± 2% ~ (p=0.591 n=10+10) MVCCGet_Pebble/batch=true/versions=1/valueSize=8/numRangeKeys=1-24 6.84µs ± 2% 7.00µs ± 1% +2.35% (p=0.000 n=10+8) MVCCGet_Pebble/batch=true/versions=10/valueSize=8/numRangeKeys=0-24 4.31µs ± 3% 4.28µs ± 2% ~ (p=0.225 n=10+10) MVCCGet_Pebble/batch=true/versions=10/valueSize=8/numRangeKeys=1-24 9.56µs ± 2% 9.83µs ± 3% +2.82% (p=0.000 n=10+10) ``` Touches #82559. Release note: None Co-authored-by: Erik Grinaker <grinaker@cockroachlabs.com>
- Loading branch information