Skip to content

Commit

Permalink
Merge #128874
Browse files Browse the repository at this point in the history
128874: kvserver: log status when lease requested r=arulajmani a=tbg

The lease acquisition loop is too silent, as seen in a recent
investigation[^1]. If we loop around multiple times, we ought
to at least log the status in each case which will give a clue
as to what was wrong with the previous lease.

[^1]: https://cockroachlabs.slack.com/archives/C0KB9Q03D/p1723534154297719?thread_ts=1723502058.001399&cid=C0KB9Q03D

Epic: none
Release note: None


Co-authored-by: Tobias Grieger <[email protected]>
  • Loading branch information
craig[bot] and tbg committed Aug 13, 2024
2 parents 3405736 + fa3d0f9 commit bb2613e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/kv/kvserver/replica_range_lease.go
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,7 @@ func (r *Replica) redirectOnOrAcquireLeaseForRequest(
// timestamp is not covered by the new lease (though we try to protect
// against this in checkRequestTimeRLocked). So instead of assuming
// anything, we iterate and check again.
log.Eventf(ctx, "waiting for acquisition/transfer after status %+v", status)
pErr = func() (pErr *kvpb.Error) {
var slowTimer timeutil.Timer
defer slowTimer.Stop()
Expand Down

0 comments on commit bb2613e

Please sign in to comment.