Skip to content

Commit 745c66e

Browse files
committed
kvserver: add PriorityInversionRequeue
This commit adds a new cluster setting PriorityInversionRequeue that controls whether the replicate queue should requeue replicas when their priority at enqueue time differs significantly from their priority at processing time (e.g. dropping from top 3 to the lowest priority).
1 parent 89aa1f5 commit 745c66e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pkg/kv/kvserver/replicate_queue.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,19 @@ var EnqueueProblemRangeInReplicateQueueInterval = settings.RegisterDurationSetti
101101
0,
102102
)
103103

104+
// TODO(wenyihu6): move these cluster settings to kvserverbase
105+
106+
// PriorityInversionRequeue is a setting that controls whether to requeue
107+
// replicas when their priority at enqueue time and processing time is inverted
108+
// too much (e.g. dropping from a repair action to AllocatorConsiderRebalance).
109+
var PriorityInversionRequeue = settings.RegisterBoolSetting(
110+
settings.SystemOnly,
111+
"kv.priority_inversion_requeue_replicate_queue.enabled",
112+
"whether the requeue replicas should requeue when enqueued for "+
113+
"repair action but ended up consider rebalancing during processing",
114+
false,
115+
)
116+
104117
// ReplicateQueueMaxSize is a setting that controls the max size of the
105118
// replicate queue. When this limit is exceeded, lower priority replicas (not
106119
// guaranteed to be the lowest) are dropped from the queue.

0 commit comments

Comments
 (0)