-
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: handle multiple iterators in
pebbleReadOnly
and pebbleBatch
Previously, `pebbleReadOnly` and `pebbleBatch` only supported a single concurrent iterator of a given type. Attempts to create an additional iterator would panic with "iterator already in use". This is particularly problematic because a subsequent change will make more iterators reusable (specifically TBI iterators), such that e.g. `MVCCIncrementalIterator` will be creating two concurrent reusable iterators and trigger this panic. This patch supports multiple iterators by creating new cloned iterators if the existing iterator is in use. This preserves the pinned engine state for the cloned iterators too. Release note: None
- Loading branch information
1 parent
9494dd3
commit 1abf1f6
Showing
3 changed files
with
90 additions
and
14 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