Skip to content

Commit

Permalink
Merge #102591
Browse files Browse the repository at this point in the history
102591: kvserver: disable `kv.expiration_leases_only.enabled` metamorphism under deadlock r=erikgrinaker a=erikgrinaker

TestClusters are usually so slow under deadlock detection that they're unable to maintain leases/leadership/liveness, especially with expiration leases.

Resolves #101612.
Resolves #101613.
Resolves #101625.
Resolves #101626.
Resolves #102519.

Epic: none
Release note: None

Co-authored-by: Erik Grinaker <[email protected]>
  • Loading branch information
craig[bot] and erikgrinaker committed Apr 28, 2023
2 parents 8203394 + f63ec0e commit f8523ec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/kv/kvserver/replica_range_lease.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/util/log"
"github.com/cockroachdb/cockroach/pkg/util/retry"
"github.com/cockroachdb/cockroach/pkg/util/stop"
"github.com/cockroachdb/cockroach/pkg/util/syncutil"
"github.com/cockroachdb/cockroach/pkg/util/timeutil"
"github.com/cockroachdb/cockroach/pkg/util/tracing"
"github.com/cockroachdb/errors"
Expand All @@ -81,7 +82,11 @@ var ExpirationLeasesOnly = settings.RegisterBoolSetting(
settings.SystemOnly,
"kv.expiration_leases_only.enabled",
"only use expiration-based leases, never epoch-based ones (experimental, affects performance)",
util.ConstantWithMetamorphicTestBool("kv.expiration_leases_only.enabled", false),
// false by default. Metamorphically enabled in tests, but not in deadlock
// builds because TestClusters are usually so slow that they're unable
// to maintain leases/leadership/liveness.
!syncutil.DeadlockEnabled &&
util.ConstantWithMetamorphicTestBool("kv.expiration_leases_only.enabled", false),
)

var leaseStatusLogLimiter = func() *log.EveryN {
Expand Down

0 comments on commit f8523ec

Please sign in to comment.