@@ -13,10 +13,12 @@ import (
13
13
"strconv"
14
14
"strings"
15
15
"testing"
16
+ "time"
16
17
17
18
"github.com/cockroachdb/cockroach/pkg/base"
18
19
"github.com/cockroachdb/cockroach/pkg/config/zonepb"
19
20
"github.com/cockroachdb/cockroach/pkg/kv/kvserver"
21
+ "github.com/cockroachdb/cockroach/pkg/kv/kvserver/allocator"
20
22
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverbase"
21
23
"github.com/cockroachdb/cockroach/pkg/multitenant/tenantcapabilitiespb"
22
24
"github.com/cockroachdb/cockroach/pkg/roachpb"
@@ -58,6 +60,13 @@ func createTestClusterArgs(ctx context.Context, numReplicas, numVoters int32) ba
58
60
clusterSettings := cluster .MakeTestingClusterSettings ()
59
61
kvserver .LoadBasedRebalancingMode .Override (ctx , & clusterSettings .SV , kvserver .LBRebalancingOff )
60
62
kvserverbase .MergeQueueEnabled .Override (ctx , & clusterSettings .SV , false )
63
+
64
+ // Set allocator intervals to scan faster to help with recovery from race
65
+ // conditions between allocator and manual relocate operations.
66
+ allocator .LoadBasedRebalanceInterval .Override (ctx , & clusterSettings .SV , 100 * time .Millisecond )
67
+ kvserver .MinLeaseTransferInterval .Override (ctx , & clusterSettings .SV , 100 * time .Millisecond )
68
+ kvserver .MinIOOverloadLeaseShedInterval .Override (ctx , & clusterSettings .SV , 100 * time .Millisecond )
69
+
61
70
return base.TestClusterArgs {
62
71
ServerArgs : base.TestServerArgs {
63
72
Settings : clusterSettings ,
0 commit comments