From baf3469989b487c017723be49d366a2d6e86cb9e Mon Sep 17 00:00:00 2001 From: Tobias Grieger Date: Mon, 20 Feb 2023 15:00:20 +0100 Subject: [PATCH] kvserver: disable overeager slow lease warning Epic: none Release note (bug fix): the following spammy log message was removed: > lease [...] expired before being followed by lease [...]; foreground traffic may have been impacted --- pkg/kv/kvserver/replica_proposal.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/kv/kvserver/replica_proposal.go b/pkg/kv/kvserver/replica_proposal.go index c693a9c1aca6..6e96d1cdadcb 100644 --- a/pkg/kv/kvserver/replica_proposal.go +++ b/pkg/kv/kvserver/replica_proposal.go @@ -370,7 +370,8 @@ func (r *Replica) leasePostApplyLocked( // NB: ProposedTS is non-nil in practice, but we never fully migrated it // in so we need to assume that it can be nil. - if iAmTheLeaseHolder && leaseChangingHands && newLease.ProposedTS != nil { + const slowLeaseWarningEnabled = false // see https://github.com/cockroachdb/cockroach/issues/97209 + if slowLeaseWarningEnabled && iAmTheLeaseHolder && leaseChangingHands && newLease.ProposedTS != nil { maybeLogSlowLeaseApplyWarning(ctx, time.Duration(now.WallTime-newLease.ProposedTS.WallTime), prevLease, newLease) }