-
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.
82789: storage: clean up `pebbleIterator` construction/initialization r=nicktrav a=erikgrinaker `pebbleIterator` construction and initialization has grown a bit bloated and convoluted over time. This patch makes some minor changes to better express the purpose of the various options: * `init()` now simply initializes the `pebbleIterator` by resetting the struct and creating the iterator options, using and reconfiguring a raw Pebble iterator if given. * `newPebbleIterator()` creates a new iterator from a given Pebble reader. * `newPebbleIteratorByCloning()` creates a new iterator by cloning a given raw Pebble iterator and reconfiguring it. * `initReuseOrCreate()` is a convenience method specialized for batch iterator reuse. It (re-)initializes an existing `pebbleIterator` by either: 1. Cloning and reconfiguring a given raw Pebble iterator. 2. Using and reconfiguring a given raw Pebble iterator. 3. Creating a new raw Pebble iterator. Additionally, the `clonableIter` interface has been removed, in favor of passing `pebble.Iterator` directly. Release note: None Co-authored-by: Erik Grinaker <[email protected]>
- Loading branch information
Showing
5 changed files
with
83 additions
and
82 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