forked from cockroachdb/pebble
-
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.
db: add iterator stats for iterators below the top-level
The current IteratorStats only include information from the top of the tree (pebble.Iterator). The new InternalIteratorStats includes block bytes loaded (and cached), and stats for points iterated over by the mergingIter. The latter includes points that were ignored because of range tombstones. These stats can be used to make inferences about root causes of slow scans. The stats are introduced by adding an InternalIteratorWithStats interface that extends InternalIterator. Not all iterators need to implement this interface (block iter, memtable iter etc.). Flexibility of plugging in InternalIterators in various places (especially for testing) is preserved by adding a trivial wrapper, internalIteratorWithEmptyStats. This wrapping introduces a bug risk that an InternalIteratorWithStats could be wrapped with an InternalIterator and then wrapped using this trivial wrapper, thereby losing the real stats. To reduce this risk, mergingIter and Iterator expect to be provided an InternalIteratorWithStats for their typical initialization paths. Informs cockroachdb#1342 Informs cockroachdb/cockroach#59069
- Loading branch information
1 parent
40d39da
commit 1efcee4
Showing
23 changed files
with
719 additions
and
185 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
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.