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

crl-release-23.2: db: ensure Metrics.WAL.BytesWritten is nondecreasing #3569

Merged
merged 2 commits into from
May 13, 2024

Commits on May 9, 2024

  1. db: update flushableEntry.logSize during flushable ingest

    Performing a flushable ingestion causes two WAL rotations: one to switch away
    from the WAL corresponding to the mutable memtable to a temporary, intermediary
    WAL for the ingestion, and one to switch to the next mutable memtable's WAL.
    Both these WAL rotations ignored the previous log size, omitting the
    propagation to the corresponding flushable.
    
    This commit fixes this bug, propagating the logSize appropriately.
    jbowens committed May 9, 2024
    Configuration menu
    Copy the full SHA
    745861a View commit details
    Browse the repository at this point in the history
  2. db: ensure Metrics.WAL.BytesWritten is nondecreasing

    The Metrics.WAL.BytesWritten metric is intended to be a monotonically
    increasing counter of all bytes written to the write-ahead log. Previously, it
    was possible for this metric to violate monotonicity immediately after a WAL
    rotation. The d.logSize value—which corresponds to the size of the current
    WAL—was not reset to zero. It was only reset after the first write to the new
    WAL.
    
    Close cockroachdb#3505.
    jbowens committed May 9, 2024
    Configuration menu
    Copy the full SHA
    07d019c View commit details
    Browse the repository at this point in the history