forked from cockroachdb/cockroach
-
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.
86093: storage: optimize `pointSynthesizingIter` for `MVCCGet` r=nicktrav a=erikgrinaker **storage: fix slice extention in `MVCCRangeKeyStack.CloneInto`** This patch makes `MVCCRangeKeyStack.CloneInto` extend the existing slice to its full capacity before growing it. Previously, this could build a slice that was too small and panic. Release note: None **storage: add `MVCCIterator.IsPrefix()`** This method allows detecting whether an iterator is a prefix iterator, which comes in handy for wrapping iterators to apply optimizations. Resolves cockroachdb#86104. Release note: None **storage: reuse `pointSynthesizingIter` range key slice** ``` name old time/op new time/op delta MVCCGet_Pebble/batch=true/versions=1/valueSize=8/numRangeKeys=0-24 3.70µs ± 1% 3.67µs ± 1% -0.89% (p=0.002 n=10+10) MVCCGet_Pebble/batch=true/versions=1/valueSize=8/numRangeKeys=1-24 7.37µs ± 0% 7.25µs ± 0% -1.70% (p=0.000 n=9+10) MVCCGet_Pebble/batch=true/versions=1/valueSize=8/numRangeKeys=10-24 14.7µs ± 1% 14.4µs ± 1% -2.21% (p=0.000 n=10+10) ``` Touches cockroachdb#83049. Release note: None **storage: add prefix mode for `pointSynthesizingIter`** This patch adds a `prefix` mode for `pointSynthesizingIter`, detected from the parent's `IsPrefix()` method. When enabled, this allows omitting key cloning and comparisons. This replaces the previous `emitOnSeekGE` parameter. ``` name old time/op new time/op delta MVCCGet_Pebble/batch=true/versions=1/valueSize=8/numRangeKeys=0-24 3.67µs ± 1% 3.67µs ± 1% ~ (p=0.517 n=10+10) MVCCGet_Pebble/batch=true/versions=1/valueSize=8/numRangeKeys=1-24 7.25µs ± 0% 7.07µs ± 0% -2.45% (p=0.000 n=10+9) MVCCGet_Pebble/batch=true/versions=1/valueSize=8/numRangeKeys=10-24 14.4µs ± 1% 14.2µs ± 1% -1.10% (p=0.000 n=10+10) ``` Touches cockroachdb#83049. Release note: None Co-authored-by: Erik Grinaker <[email protected]>
- Loading branch information
Showing
11 changed files
with
180 additions
and
182 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
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
Oops, something went wrong.