Skip to content

Commit

Permalink
kvserver: deflake TestMergeQueueSeesNonVoters
Browse files Browse the repository at this point in the history
TestMergeQueueSeesNonVoters was flaky because of a race between turning
the merge queue on and off. The merge queue was first turned on via a
cluster config, and then turned off using the store directly. However,
it's possible for the cluster config to take effect after the queue was
turned off via the store and leave the merge queue on for the rest of
the test, causing unexpected range merges. The cluster config is
actually unnecessary, so this change just removes it.

Fixes: #105726
Epic: CRDB-29164

Release note: None
  • Loading branch information
miraradeva committed Jul 13, 2023
1 parent 708e6f0 commit cd729e1
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/kv/kvserver/client_merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4722,10 +4722,6 @@ func TestMergeQueueSeesNonVoters(t *testing.T) {
t.Run(subtest.name, func(t *testing.T) {
tc, _ := setupTestClusterWithDummyRange(t, clusterArgs, dbName, "kv", numNodes)
defer tc.Stopper().Stop(ctx)
// We're controlling merge queue operation via
// `store.SetMergeQueueActive`, so enable the cluster setting here.
_, err := tc.ServerConn(0).Exec(`SET CLUSTER SETTING kv.range_merge.queue_enabled=true`)
require.NoError(t, err)

store, err := tc.Server(0).GetStores().(*kvserver.Stores).GetStore(1)
require.Nil(t, err)
Expand Down

0 comments on commit cd729e1

Please sign in to comment.