Skip to content

kvserver: fix metrics collection for rejected lease requests#64531

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
aayushshah15:20210501_augmentLeaseRequestRejectionMetric
May 4, 2021
Merged

kvserver: fix metrics collection for rejected lease requests#64531
craig[bot] merged 1 commit intocockroachdb:masterfrom
aayushshah15:20210501_augmentLeaseRequestRejectionMetric

Conversation

@aayushshah15
Copy link
Copy Markdown
Contributor

Previously, we were only updating the leases.error (metric measuring the
number of failed lease requests) if a lease request failed during command
evaluation. However after #55148, lease requests can be rejected by the replica
proposal buffer if there is a known raft leader that is different from the
replica requesting the lease. We were not recording such rejections as failed
lease requests in the metrics.

This commit fixes this oversight.

Release note: None

Previously, we were only updating the `leases.error` (metric measuring the
number of failed lease requests) if a lease request failed during command
evaluation. However after cockroachdb#55148, lease requests can be rejected by the replica
proposal buffer if there is a known raft leader that is different from the
replica requesting the lease. We were not recording such rejections as failed
lease requests in the metrics.

This commit fixes this oversight.

Release note: None
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@nvb nvb left a comment

Choose a reason for hiding this comment

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

Nice catch!

@aayushshah15 aayushshah15 reopened this May 4, 2021
@aayushshah15
Copy link
Copy Markdown
Contributor Author

TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented May 4, 2021

Build succeeded:

@craig craig bot merged commit 1db3036 into cockroachdb:master May 4, 2021
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.

3 participants