@@ -8,6 +8,7 @@ package kvserver
8
8
import (
9
9
"context"
10
10
"fmt"
11
+ "math"
11
12
"time"
12
13
13
14
"github.com/cockroachdb/cockroach/pkg/gossip"
@@ -24,6 +25,7 @@ import (
24
25
"github.com/cockroachdb/cockroach/pkg/spanconfig"
25
26
"github.com/cockroachdb/cockroach/pkg/util/hlc"
26
27
"github.com/cockroachdb/cockroach/pkg/util/log"
28
+ "github.com/cockroachdb/cockroach/pkg/util/metamorphic"
27
29
"github.com/cockroachdb/cockroach/pkg/util/metric"
28
30
"github.com/cockroachdb/cockroach/pkg/util/retry"
29
31
"github.com/cockroachdb/cockroach/pkg/util/timeutil"
@@ -111,19 +113,20 @@ var PriorityInversionRequeue = settings.RegisterBoolSetting(
111
113
"kv.priority_inversion_requeue_replicate_queue.enabled" ,
112
114
"whether the requeue replicas should requeue when enqueued for " +
113
115
"repair action but ended up consider rebalancing during processing" ,
114
- false ,
116
+ metamorphic . ConstantWithTestBool ( "kv.priority_inversion_requeue_replicate_queue.enabled" , false /*defaultValue*/ ) ,
115
117
)
116
118
117
119
// ReplicateQueueMaxSize is a setting that controls the max size of the
118
120
// replicate queue. When this limit is exceeded, lower priority replicas (not
119
121
// guaranteed to be the lowest) are dropped from the queue.
120
122
var ReplicateQueueMaxSize = settings .RegisterIntSetting (
121
- settings .ApplicationLevel ,
123
+ settings .SystemOnly ,
122
124
"kv.replicate_queue.max_size" ,
123
125
"maximum number of replicas that can be queued for replicate queue processing; " +
124
126
"when this limit is exceeded, lower priority (not guaranteed to be the lowest) " +
125
127
"replicas are dropped from the queue" ,
126
- defaultQueueMaxSize ,
128
+ metamorphic .ConstantWithTestChoice [int64 ]("kv.replicate_queue.max_size" ,
129
+ defaultQueueMaxSize /*defaultValue*/ , math .MaxInt32 /*otherValues*/ ),
127
130
settings .WithValidateInt (func (v int64 ) error {
128
131
if v < defaultQueueMaxSize {
129
132
return errors .Errorf ("cannot be set to a value lower than %d: %d" , defaultQueueMaxSize , v )
0 commit comments