Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-22.2: kvserver: disable replicate queue and lease transfers in closedts tests #108591

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/kv/kvserver/closed_timestamp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 4 additions & 0 deletions pkg/testutils/serverutils/test_cluster_shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down