@@ -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,21 @@ 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" ,
117
+ false /*defaultValue*/ ),
115
118
)
116
119
117
120
// ReplicateQueueMaxSize is a setting that controls the max size of the
118
121
// replicate queue. When this limit is exceeded, lower priority replicas (not
119
122
// guaranteed to be the lowest) are dropped from the queue.
120
123
var ReplicateQueueMaxSize = settings .RegisterIntSetting (
121
- settings .ApplicationLevel ,
124
+ settings .SystemOnly ,
122
125
"kv.replicate_queue.max_size" ,
123
126
"maximum number of replicas that can be queued for replicate queue processing; " +
124
127
"when this limit is exceeded, lower priority (not guaranteed to be the lowest) " +
125
128
"replicas are dropped from the queue" ,
126
- defaultQueueMaxSize ,
129
+ metamorphic .ConstantWithTestChoice [int64 ]("kv.replicate_queue.max_size" ,
130
+ defaultQueueMaxSize /*defaultValue*/ , math .MaxInt32 /*otherValues*/ ),
127
131
settings .WithValidateInt (func (v int64 ) error {
128
132
if v < defaultQueueMaxSize {
129
133
return errors .Errorf ("cannot be set to a value lower than %d: %d" , defaultQueueMaxSize , v )
0 commit comments