-
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.
*: return *InternalKV from internal iterators
Previously, internal iterators' positioning methods returned two return values, a pointer to an internal key and a LazyValue struct. This commit collapses these two return values into a single return value: a pointer to an InternalKV struct. The key and value buffers were already owned by the underlying iterator, so passing the base.LazyValue as a value did not decouple the two. Propagating a single *InternalKV pointer can be cheaper in some instances. More importantly, it allows us to propagate additional information without increasing the amount of copying up and down the iterator stack. I anticipate this being useful in the implementation of cockroachdb/cockroach#111001, allowing us to propagate checksums alongside keys and values. Future work may add an explicit error return value.
- Loading branch information
Showing
60 changed files
with
2,047 additions
and
2,161 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.