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

kvserver: split upreplication from recovery metrics #119028

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

andrewbaptist
Copy link
Collaborator

Previously both raft recovery and upreplication snapshots were counted as recovery metrics. This PR splits them into two separate categories.

Epic: none
Fixes: #115729

Release note (ops change): Adds 2 new metrics
range.snapshots.upreplication.rcvd-bytes and
range.snapshots.upreplication.sent-bytes. It also changes the meaning of range.snapshots.recovery.rcvd-bytes and
range.snapshots.recovery.sent-bytes to only include raft snapshots.

Copy link

blathers-crl bot commented Feb 9, 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

@andrewbaptist andrewbaptist force-pushed the 2024-02-09-snapshot-metrics branch from c827ff0 to 83499f5 Compare February 9, 2024 21:36
@andrewbaptist andrewbaptist marked this pull request as ready for review February 26, 2024 19:51
@andrewbaptist andrewbaptist requested a review from a team as a code owner February 26, 2024 19:51
@andrewbaptist andrewbaptist requested a review from kvoli February 26, 2024 19:51
Copy link
Collaborator

@kvoli kvoli left a comment

Choose a reason for hiding this comment

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

The change looks good. Should we include the new metric in the DB console snapshot chart here?

Also consider adding a test case that tests up-replication snapshot bytes. It doesn't appear that we have any atm, the closest I could find was for x-locality.

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

@andrewbaptist andrewbaptist added GA-blocker branch-release-24.1 Used to mark GA and release blockers, technical advisories, and bugs for 24.1 labels Mar 13, 2024
@andrewbaptist andrewbaptist force-pushed the 2024-02-09-snapshot-metrics branch from 83499f5 to 9cffd2e Compare April 12, 2024 18:11
@andrewbaptist andrewbaptist requested a review from a team as a code owner April 12, 2024 18:11
@andrewbaptist andrewbaptist requested review from nkodali and removed request for a team April 12, 2024 18:11
@andrewbaptist andrewbaptist added the backport-24.1.x Flags PRs that need to be backported to 24.1. label Apr 12, 2024
@andrewbaptist
Copy link
Collaborator Author

I realized I hadn't finished this as I was clearing out my 24.1 tasks.

I still didn't create a unit test, but I added it to the UI and run a manual test to validate it shows up correctly in the UI and is populated.

image

Metrics in general are a pain to test well in unit tests, although maybe we should think about how to make this easier. Its easy to see if they are "zero or non-zero" but harder to tell if they are right.

Previously both raft recovery and upreplication snapshots were counted
as recovery metrics. This PR splits them into two separate categories.

Epic: none
Fixes: cockroachdb#115729

Release note (ops change): Adds 2 new metrics
range.snapshots.upreplication.rcvd-bytes and
range.snapshots.upreplication.sent-bytes. It also changes the meaning of
range.snapshots.recovery.rcvd-bytes and
range.snapshots.recovery.sent-bytes to only include raft snapshots.
Additionally it adds the new line to the "Snapshot Data Received"
graph.
@andrewbaptist andrewbaptist force-pushed the 2024-02-09-snapshot-metrics branch from 9cffd2e to def6033 Compare April 12, 2024 18:45
@andrewbaptist andrewbaptist requested a review from kvoli April 12, 2024 18:47
@andrewbaptist
Copy link
Collaborator Author

@kvoli let me know if you will get a chance to review this. We can also decide to not backport this to 24.1 and just put it in master. Thanks! The only change of note is the addition of the pages to the UI.

Copy link
Collaborator

@kvoli kvoli left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 4 of 5 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @nkodali)

@andrewbaptist
Copy link
Collaborator Author

bors r=kvoli

TFTR!

@craig craig bot merged commit d772813 into cockroachdb:master Apr 25, 2024
22 checks passed
@andrewbaptist andrewbaptist deleted the 2024-02-09-snapshot-metrics branch April 25, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-24.1.x Flags PRs that need to be backported to 24.1. branch-release-24.1 Used to mark GA and release blockers, technical advisories, and bugs for 24.1 GA-blocker
Projects
None yet
3 participants