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

Conversation

jbowens
Copy link
Collaborator

@jbowens jbowens commented Apr 30, 2024

23.2 backport of #3555

@jbowens jbowens requested review from a team and RaduBerinde April 30, 2024 15:23
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link

@dhartunian dhartunian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 5 of 5 files at r1.
Reviewable status: 2 of 6 files reviewed, 1 unresolved discussion (waiting on @jbowens and @RaduBerinde)


testdata/metrics line 487 at r2 (raw file):

unknown command: <<<<<<<

>>>>>>> 9027c15f (db: update flushableEntry.logSize during flushable ingest)

I think you have merge conflicts that need resolution

Copy link
Collaborator Author

@jbowens jbowens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 2 of 6 files reviewed, 1 unresolved discussion (waiting on @dhartunian and @RaduBerinde)


testdata/metrics line 487 at r2 (raw file):

Previously, dhartunian (David Hartunian) wrote…

I think you have merge conflicts that need resolution

embarassing, thanks

@jbowens
Copy link
Collaborator Author

jbowens commented May 9, 2024

bumping

Copy link
Member

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: 2 of 6 files reviewed, 1 unresolved discussion (waiting on @dhartunian)


testdata/metrics line 487 at r2 (raw file):

Previously, jbowens (Jackson Owens) wrote…

embarassing, thanks

[nit] These are fixed in the subsequent commit but not this one

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.
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
Copy link
Collaborator Author

jbowens commented May 13, 2024

TFTR!

@jbowens jbowens merged commit 3622ade into cockroachdb:crl-release-23.2 May 13, 2024
10 checks passed
@jbowens jbowens deleted the 23.2-3555 branch May 13, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants