Skip to content

Commit b7669c9

Browse files
committed
kvserver: default ReplicateQueueMaxSize to math.MaxInt64
Previously, the maximum size of the replicate queue was made configurable via a cluster setting, since replica item structs are small and enforcing the a max size seemed unnecessary. This commit sets the default replicate queue size to MaxInt64. This allows more backing time on the master since we plan to backport the change and give customers the option to set it to MaxInt64. If this behavior proves stable, MaxInt64 will become the default replicate queue size in future releases as well.
1 parent 29896e5 commit b7669c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/kv/kvserver/replicate_queue.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package kvserver
88
import (
99
"context"
1010
"fmt"
11+
"math"
1112
"time"
1213

1314
"github.com/cockroachdb/cockroach/pkg/gossip"
@@ -109,7 +110,7 @@ var ReplicateQueueMaxSize = settings.RegisterIntSetting(
109110
"maximum number of replicas that can be queued for replicate queue processing; "+
110111
"when this limit is exceeded, lower priority (not guaranteed to be the lowest) "+
111112
"replicas are dropped from the queue",
112-
defaultQueueMaxSize,
113+
math.MaxInt64,
113114
settings.WithValidateInt(func(v int64) error {
114115
if v < defaultQueueMaxSize {
115116
return errors.Errorf("cannot be set to a value lower than %d: %d", defaultQueueMaxSize, v)

0 commit comments

Comments
 (0)