-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: fix and re-enable slow lease application logging #105519
Conversation
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. |
pkg/kv/kvserver/replica_proposal.go
Outdated
if leaseChangingHands && iAmTheLeaseHolder { | ||
// Log acquisition of meta and liveness range leases. These are critical to | ||
// cluster health, so it's useful to know their location over time. | ||
if r.descRLocked().StartKey.Less(roachpb.RKey(keys.NodeLivenessKeyMax)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the looks of it this could be moved into maybeLogSlowLeaseApplyWarning
with system bool
flag, but it's fine as is too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't slow application though, we log every time the lease is acquired regardless of how slowly it's applied. But I can restructure the entire method to be about lease application logging.
Epic: none Release note: None
8d6172b
to
14b992c
Compare
bors r+ |
Build succeeded: |
Resolves #97209.
Epic: none
Release note: None