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

kv: increment txn.restarts.writetooold on WriteTooOld error #119411

Merged
merged 1 commit into from Feb 20, 2024

Conversation

nvanbenschoten
Copy link
Member

WriteTooOld errors were previously counted in either the txn.restarts.writetooold metric or the txn.restarts.writetoooldmulti metric, depending on when in the lifecycle of a transaction they were thrown. Now that WriteTooOld errors are rarely (never?) deferred, we would like to consolidate these metrics to avoid confusion.

As a first step, we now increment txn.restarts.writetooold in both cases. In the next release, we can remove the txn.restarts.writetoooldmulti metric and its presence in the "Transaction Restarts" graph in the SQL Dashboard.

Release note (ui change): The "Write Too Old" metric in the "Transaction Restarts" graph under the SQL Dashboard now includes all restarts previously categorized as "Write Too Old (multiple)". The former is a now a superset of the latter. The "Write Too Old (multiple)" metric will be removed in a future release.

WriteTooOld errors were previously counted in either the
`txn.restarts.writetooold` metric or the `txn.restarts.writetoooldmulti` metric,
depending on when in the lifecycle of a transaction they were thrown. Now that
WriteTooOld errors are rarely (never?) deferred, we would like to consolidate
these metrics to avoid confusion.

As a first step, we now increment `txn.restarts.writetooold` in both cases. In
the next release, we can remove the `txn.restarts.writetoooldmulti` metric and
its presence in the "Transaction Restarts" graph in the SQL Dashboard.

Release note (ui change): The "Write Too Old" metric in the "Transaction Restarts"
graph under the SQL Dashboard now includes all restarts previously categorized as
"Write Too Old (multiple)". The former is a now a superset of the latter. The
"Write Too Old (multiple)" metric will be removed in a future release.
Copy link

blathers-crl bot commented Feb 20, 2024

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@arulajmani arulajmani left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @nvanbenschoten)


-- commits line 7 at r1:
It is never, right?


-- commits line 11 at r1:
Should we open an issue for this?

Separately, should we also open an issue to remove the WriteTooOld field from Transaction proto, now that we don't need to worry about 23.1 compatibility?

Copy link
Member Author

@nvanbenschoten nvanbenschoten left a comment

Choose a reason for hiding this comment

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

TFTR!

bors r+

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @arulajmani)


-- commits line 7 at r1:

Previously, arulajmani (Arul Ajmani) wrote…

It is never, right?

In non-mixed version clusters, I believe that's correct.


-- commits line 11 at r1:

Should we open an issue for this?

Done: #119413.

Separately, should we also open an issue to remove the WriteTooOld field from Transaction proto, now that we don't need to worry about 23.1 compatibility?

Done: #119414.

Copy link
Collaborator

@arulajmani arulajmani 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: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @nvanbenschoten)


-- commits line 11 at r1:

Previously, nvanbenschoten (Nathan VanBenschoten) wrote…

Should we open an issue for this?

Done: #119413.

Separately, should we also open an issue to remove the WriteTooOld field from Transaction proto, now that we don't need to worry about 23.1 compatibility?

Done: #119414.

Thanks for opening these!

@craig
Copy link
Contributor

craig bot commented Feb 20, 2024

Build succeeded:

@craig craig bot merged commit 6a84e2e into cockroachdb:master Feb 20, 2024
7 of 14 checks passed
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

3 participants