Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage: aggregate iterator stats #99726

Merged
merged 2 commits into from
Apr 3, 2023

Commits on Apr 2, 2023

  1. storage: hide raw iterator from EngineIterator interface

    Previously, the EngineIterator interface exposed a GetRawIter method to
    retrieve the underlying Pebble iterator. This existed only to facilitate
    iterator clones and was intended to only ever be consumed by the storage
    package itself.
    
    This commit replaces GetRawIter with a CloneContext method that returns an
    opaque CloneContext type that contains the raw iterator. This prevents external
    packages from directly using the raw Pebble iterator. It also prepares for the
    introduction of aggregation of iterator stats, providing an envelope for
    propagating information on where to aggregate iterator stats when the clonee
    iterator closes.
    
    Epic: None
    Release note: None
    jbowens committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    efb9314 View commit details
    Browse the repository at this point in the history
  2. storage: aggregate iterator stats

    Aggregate the iterator stats across all of an engine's iterators. Expose seven
    new timeseries metrics for visibility into the behavior of storage engine iterators:
    
      - storage.iterator.block-load.bytes
      - storage.iterator.block-load.cached-bytes
      - storage.iterator.block-load.read-duration
      - storage.iterator.external.seeks
      - storage.iterator.external.steps
      - storage.iterator.internal.seeks
      - storage.iterator.internal.steps
    
    Close cockroachdb#95790.
    Epic: None
    Release note (ops change): Introduces seven new timeseries metrics for better
    visibility into the behavior of storage engine iterators and their internals.
    jbowens committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    e1254a8 View commit details
    Browse the repository at this point in the history