diff --git a/pkg/kv/kvserver/closed_timestamp_test.go b/pkg/kv/kvserver/closed_timestamp_test.go index 8b15fa14a611..25ce3c6ba057 100644 --- a/pkg/kv/kvserver/closed_timestamp_test.go +++ b/pkg/kv/kvserver/closed_timestamp_test.go @@ -1197,9 +1197,15 @@ func setupClusterForClosedTSTesting( SET CLUSTER SETTING kv.closed_timestamp.target_duration = '%s'; SET CLUSTER SETTING kv.closed_timestamp.side_transport_interval = '%s'; SET CLUSTER SETTING kv.closed_timestamp.follower_reads_enabled = true; +SET CLUSTER SETTING kv.allocator.load_based_rebalancing = 'off'; `, targetDuration, targetDuration/4), ";")...) + // Disable replicate queues to avoid errant lease transfers. + // + // See: https://github.com/cockroachdb/cockroach/issues/101824. + tc.ToggleReplicateQueues(false) + return tc, tc.ServerConn(0), desc } diff --git a/pkg/testutils/serverutils/test_cluster_shim.go b/pkg/testutils/serverutils/test_cluster_shim.go index dad40b120bde..d580773cefa4 100644 --- a/pkg/testutils/serverutils/test_cluster_shim.go +++ b/pkg/testutils/serverutils/test_cluster_shim.go @@ -231,6 +231,10 @@ type TestClusterInterface interface { // TODO(radu): we should verify that the queries in tests using SplitTable // are indeed distributed as intended. SplitTable(t *testing.T, desc catalog.TableDescriptor, sps []SplitPoint) + + // ToggleReplicateQueues activates or deactivates the replication queues on all + // the stores on all the nodes. + ToggleReplicateQueues(active bool) } // SplitPoint describes a split point that is passed to SplitTable.