From b1c4c674d895ee41a81df794b64bb9a2ca801e4c Mon Sep 17 00:00:00 2001 From: Erik Grinaker Date: Mon, 27 Mar 2023 17:15:59 +0000 Subject: [PATCH] release-22.1: Revert #98150 This reverts #98150 because we think it introduced a problem that was detected via the `replicate/wide` roachtest[^1]. It seems that for reasons still unknown we do rely on the periodic gossip trigger on liveness lease extensions. [^1]: https://github.com/cockroachdb/cockroach/issues/99268#issuecomment-1484968745 Touches #99268. Touches #97966. Closes #99268. Touches #98945. Epic: none Release note: None --- pkg/kv/kvserver/replica_proposal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kv/kvserver/replica_proposal.go b/pkg/kv/kvserver/replica_proposal.go index b31e33dd45a5..b7c908c43acc 100644 --- a/pkg/kv/kvserver/replica_proposal.go +++ b/pkg/kv/kvserver/replica_proposal.go @@ -392,7 +392,7 @@ func (r *Replica) leasePostApplyLocked( // seconds) in any case due to the liveness heartbeats. And the system config // will be gossiped rarely because it falls on a range with an epoch-based // range lease that is only reacquired extremely infrequently. - if leaseChangingHands && iAmTheLeaseHolder { + if iAmTheLeaseHolder { // NB: run these in an async task to keep them out of the critical section // (r.mu is held here). _ = r.store.stopper.RunAsyncTask(r.AnnotateCtx(context.Background()), "lease-triggers", func(ctx context.Context) {