Skip to content

Commit 8d91e0d

Browse files
committed
conflict
Signed-off-by: 童剑 <[email protected]>
2 parents 1a2d2ab + c5fbe89 commit 8d91e0d

File tree

31 files changed

+1127
-176
lines changed

31 files changed

+1127
-176
lines changed

client/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/opentracing/opentracing-go v1.2.0
1111
github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c
1212
github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86
13-
github.com/pingcap/kvproto v0.0.0-20250224053625-b6a98c6bf02d
13+
github.com/pingcap/kvproto v0.0.0-20250512085210-1174a93e5067
1414
github.com/pingcap/log v1.1.1-0.20221110025148-ca232912c9f3
1515
github.com/prometheus/client_golang v1.20.5
1616
github.com/stretchr/testify v1.9.0

client/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c h1:xpW9bvK+HuuTm
4949
github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c/go.mod h1:X2r9ueLEUZgtx2cIogM0v4Zj5uvvzhuuiu7Pn8HzMPg=
5050
github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86 h1:tdMsjOqUR7YXHoBitzdebTvOjs/swniBTOLy5XiMtuE=
5151
github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86/go.mod h1:exzhVYca3WRtd6gclGNErRWb1qEgff3LYta0LvRmON4=
52-
github.com/pingcap/kvproto v0.0.0-20250224053625-b6a98c6bf02d h1:52qhTQG8G8V/pHo/w7F4d2Tw98KMk2C+gAe3U8SWRAg=
53-
github.com/pingcap/kvproto v0.0.0-20250224053625-b6a98c6bf02d/go.mod h1:rXxWk2UnwfUhLXha1jxRWPADw9eMZGWEWCg92Tgmb/8=
52+
github.com/pingcap/kvproto v0.0.0-20250512085210-1174a93e5067 h1:UJpCOXMB68EGVUOp7xklJ46+sgNDzYqFK/k2aDG8JQQ=
53+
github.com/pingcap/kvproto v0.0.0-20250512085210-1174a93e5067/go.mod h1:rXxWk2UnwfUhLXha1jxRWPADw9eMZGWEWCg92Tgmb/8=
5454
github.com/pingcap/log v1.1.1-0.20221110025148-ca232912c9f3 h1:HR/ylkkLmGdSSDaD8IDP+SZrdhV1Kibl9KrHxJ9eciw=
5555
github.com/pingcap/log v1.1.1-0.20221110025148-ca232912c9f3/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4=
5656
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=

client/servicediscovery/service_discovery_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func (suite *serviceClientTestSuite) SetupSuite() {
159159
}
160160
time.Sleep(50 * time.Millisecond)
161161
}
162-
suite.NotNil(suite.leaderClient)
162+
suite.Require().NotNil(suite.leaderClient)
163163
}
164164

165165
func (suite *serviceClientTestSuite) TearDownTest() {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ require (
3535
github.com/pingcap/errcode v0.3.0
3636
github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c
3737
github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86
38-
github.com/pingcap/kvproto v0.0.0-20250224053625-b6a98c6bf02d
38+
github.com/pingcap/kvproto v0.0.0-20250512085210-1174a93e5067
3939
github.com/pingcap/log v1.1.1-0.20221110025148-ca232912c9f3
4040
github.com/pingcap/sysutil v1.0.1-0.20230407040306-fb007c5aff21
4141
github.com/pingcap/tidb-dashboard v0.0.0-20250219061340-d62018124ae2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,8 @@ github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c/go.mod h1:X2r9ue
392392
github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86 h1:tdMsjOqUR7YXHoBitzdebTvOjs/swniBTOLy5XiMtuE=
393393
github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86/go.mod h1:exzhVYca3WRtd6gclGNErRWb1qEgff3LYta0LvRmON4=
394394
github.com/pingcap/kvproto v0.0.0-20191211054548-3c6b38ea5107/go.mod h1:WWLmULLO7l8IOcQG+t+ItJ3fEcrL5FxF0Wu+HrMy26w=
395-
github.com/pingcap/kvproto v0.0.0-20250224053625-b6a98c6bf02d h1:52qhTQG8G8V/pHo/w7F4d2Tw98KMk2C+gAe3U8SWRAg=
396-
github.com/pingcap/kvproto v0.0.0-20250224053625-b6a98c6bf02d/go.mod h1:rXxWk2UnwfUhLXha1jxRWPADw9eMZGWEWCg92Tgmb/8=
395+
github.com/pingcap/kvproto v0.0.0-20250512085210-1174a93e5067 h1:UJpCOXMB68EGVUOp7xklJ46+sgNDzYqFK/k2aDG8JQQ=
396+
github.com/pingcap/kvproto v0.0.0-20250512085210-1174a93e5067/go.mod h1:rXxWk2UnwfUhLXha1jxRWPADw9eMZGWEWCg92Tgmb/8=
397397
github.com/pingcap/log v0.0.0-20210625125904-98ed8e2eb1c7/go.mod h1:8AanEdAHATuRurdGxZXBz0At+9avep+ub7U1AGYLIMM=
398398
github.com/pingcap/log v1.1.1-0.20221110025148-ca232912c9f3 h1:HR/ylkkLmGdSSDaD8IDP+SZrdhV1Kibl9KrHxJ9eciw=
399399
github.com/pingcap/log v1.1.1-0.20221110025148-ca232912c9f3/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4=

pkg/gc/gc_state_manager.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323

2424
"go.uber.org/zap"
2525

26+
"github.com/pingcap/kvproto/pkg/keyspacepb"
2627
"github.com/pingcap/log"
2728

2829
"github.com/tikv/pd/pkg/errs"
@@ -432,11 +433,14 @@ func (*GCStateManager) logAdvancingTxnSafePoint(keyspaceID uint32, result Advanc
432433
// GC barrier can extend its lifetime arbitrarily.
433434
//
434435
// Passing non-positive value to ttl is not allowed. Passing `time.Duration(math.MaxInt64)` to ttl indicates that the
435-
// GC barrier should never expire.
436+
// GC barrier should never expire. The ttl might be rounded up, and the actual ttl is guaranteed no less than the
437+
// specified duration.
436438
//
437439
// The barrierID must be non-empty. For NullKeyspace, "gc_worker" is a reserved name and cannot be used as a barrierID.
438440
//
439441
// The given barrierTS must be greater than or equal to the current txn safe point, or an error will be returned.
442+
//
443+
// When this function executes successfully, its result is never nil.
440444
func (m *GCStateManager) SetGCBarrier(keyspaceID uint32, barrierID string, barrierTS uint64, ttl time.Duration, now time.Time) (*endpoint.GCBarrier, error) {
441445
if ttl <= 0 {
442446
return nil, errs.ErrInvalidArgument.GenWithStackByArgs("ttl", ttl)
@@ -617,6 +621,7 @@ func (m *GCStateManager) GetGCState(keyspaceID uint32) (GCState, error) {
617621

618622
// GetAllKeyspacesGCStates returns the GC state of all keyspaces.
619623
// Returns a map from keyspaceID to GCState. Keyspaces without keyspace-level GC enabled will not be included.
624+
// Note, it returns only the GC states of active keyspace. If a keyspace is in DISABLE/ARCHIVED/TOMBSTONE state, it's ignored here.
620625
func (m *GCStateManager) GetAllKeyspacesGCStates() (map[uint32]GCState, error) {
621626
// TODO: Handle the case that there are too many keyspaces and loading them at once is not suitable.
622627
allKeyspaces, err := m.keyspaceManager.LoadRangeKeyspace(0, 0)
@@ -639,6 +644,11 @@ func (m *GCStateManager) GetAllKeyspacesGCStates() (map[uint32]GCState, error) {
639644
}
640645

641646
for _, keyspaceMeta := range allKeyspaces {
647+
// Just handle the active keyspace, leave the others up to keyspace management.
648+
if keyspaceMeta.State != keyspacepb.KeyspaceState_ENABLED {
649+
continue
650+
}
651+
642652
if keyspaceMeta.Config[keyspace.GCManagementType] != keyspace.KeyspaceLevelGC {
643653
results[keyspaceMeta.Id] = GCState{
644654
KeyspaceID: keyspaceMeta.Id,

pkg/gc/gc_state_manager_test.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
"github.com/stretchr/testify/suite"
2828

2929
"github.com/pingcap/errors"
30+
"github.com/pingcap/kvproto/pkg/keyspacepb"
3031

3132
"github.com/tikv/pd/pkg/errs"
3233
"github.com/tikv/pd/pkg/id"
@@ -125,6 +126,16 @@ func newGCStateManagerForTest(t *testing.T) (storage *endpoint.StorageEndpoint,
125126
re.NoError(err)
126127
re.Equal(uint32(3), ks3.Id)
127128

129+
ks4, err := keyspaceManager.CreateKeyspace(&keyspace.CreateKeyspaceRequest{
130+
Name: "ks4",
131+
Config: map[string]string{},
132+
CreateTime: time.Now().Unix(),
133+
})
134+
re.NoError(err)
135+
_, err = keyspaceManager.UpdateKeyspaceState("ks4", keyspacepb.KeyspaceState_DISABLED, time.Now().Unix())
136+
re.NoError(err)
137+
re.Equal(uint32(4), ks4.Id)
138+
128139
return s, s.GetGCStateProvider(), gcStateManager, clean
129140
}
130141

@@ -135,7 +146,7 @@ func (s *gcStateManagerTestSuite) SetupTest() {
135146
s.keyspacePresets.manageable = []uint32{constant.NullKeyspaceID, 2}
136147
s.keyspacePresets.unmanageable = []uint32{0, 1, 3}
137148
s.keyspacePresets.unifiedGC = []uint32{constant.NullKeyspaceID, 0, 1, 3}
138-
s.keyspacePresets.notExisting = []uint32{4, 0xffffff}
149+
s.keyspacePresets.notExisting = []uint32{5, 0xffffff}
139150
s.keyspacePresets.nullSynonyms = []uint32{constant.NullKeyspaceID, 0x1000000, 0xfffffffe}
140151
}
141152

pkg/keyspace/keyspace.go

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,16 @@ type CreateKeyspaceRequest struct {
107107
CreateTime int64
108108
}
109109

110+
// CreateKeyspaceByIDRequest represents necessary arguments to create a keyspace.
111+
type CreateKeyspaceByIDRequest struct {
112+
// ID of the keyspace to be created.
113+
// Using an existing ID will result in error.
114+
ID *uint32
115+
Config map[string]string
116+
// CreateTime is the timestamp used to record creation time.
117+
CreateTime int64
118+
}
119+
110120
// NewKeyspaceManager creates a Manager of keyspace related data.
111121
func NewKeyspaceManager(
112122
ctx context.Context,
@@ -280,6 +290,81 @@ func (manager *Manager) CreateKeyspace(request *CreateKeyspaceRequest) (*keyspac
280290
return keyspace, nil
281291
}
282292

293+
// CreateKeyspaceByID create a keyspace meta with given config and save it to storage.
294+
func (manager *Manager) CreateKeyspaceByID(request *CreateKeyspaceByIDRequest) (*keyspacepb.KeyspaceMeta, error) {
295+
if request.ID == nil {
296+
return nil, errors.New("keyspace id is empty")
297+
}
298+
id := *request.ID
299+
name := strconv.FormatUint(uint64(id), 10)
300+
userKind := endpoint.StringUserKind(request.Config[UserKindKey])
301+
config, err := manager.kgm.GetKeyspaceConfigByKind(userKind)
302+
if err != nil {
303+
return nil, err
304+
}
305+
if len(config) != 0 {
306+
if request.Config == nil {
307+
request.Config = config
308+
} else {
309+
request.Config[TSOKeyspaceGroupIDKey] = config[TSOKeyspaceGroupIDKey]
310+
request.Config[UserKindKey] = config[UserKindKey]
311+
}
312+
}
313+
// Create a disabled keyspace meta for tikv-server to get the config on keyspace split.
314+
keyspace := &keyspacepb.KeyspaceMeta{
315+
Id: id,
316+
Name: name,
317+
State: keyspacepb.KeyspaceState_DISABLED,
318+
CreatedAt: request.CreateTime,
319+
StateChangedAt: request.CreateTime,
320+
Config: request.Config,
321+
}
322+
err = manager.saveNewKeyspace(keyspace)
323+
if err != nil {
324+
log.Warn("[keyspace] failed to save keyspace before split",
325+
zap.Uint32("keyspace-id", keyspace.GetId()),
326+
zap.String("keyspace-name", keyspace.GetName()),
327+
zap.Error(err),
328+
)
329+
return nil, err
330+
}
331+
// Split keyspace region.
332+
err = manager.splitKeyspaceRegion(id, manager.config.ToWaitRegionSplit())
333+
if err != nil {
334+
err2 := manager.store.RunInTxn(manager.ctx, func(txn kv.Txn) error {
335+
metaPath := keypath.KeyspaceMetaPath(id)
336+
return txn.Remove(metaPath)
337+
})
338+
if err2 != nil {
339+
log.Warn("[keyspace] failed to remove pre-created keyspace after split failed",
340+
zap.Uint32("keyspace-id", keyspace.GetId()),
341+
zap.String("keyspace-name", keyspace.GetName()),
342+
zap.Error(err2),
343+
)
344+
}
345+
return nil, err
346+
}
347+
// enable the keyspace metadata after split.
348+
keyspace.State = keyspacepb.KeyspaceState_ENABLED
349+
_, err = manager.UpdateKeyspaceStateByID(id, keyspacepb.KeyspaceState_ENABLED, request.CreateTime)
350+
if err != nil {
351+
log.Warn("[keyspace] failed to create keyspace",
352+
zap.Uint32("keyspace-id", keyspace.GetId()),
353+
zap.String("keyspace-name", keyspace.GetName()),
354+
zap.Error(err),
355+
)
356+
return nil, err
357+
}
358+
if err := manager.kgm.UpdateKeyspaceForGroup(userKind, config[TSOKeyspaceGroupIDKey], keyspace.GetId(), opAdd); err != nil {
359+
return nil, err
360+
}
361+
log.Info("[keyspace] keyspace created",
362+
zap.Uint32("keyspace-id", keyspace.GetId()),
363+
zap.String("keyspace-name", keyspace.GetName()),
364+
)
365+
return keyspace, nil
366+
}
367+
283368
func (manager *Manager) saveNewKeyspace(keyspace *keyspacepb.KeyspaceMeta) error {
284369
manager.metaLock.Lock(keyspace.Id)
285370
defer manager.metaLock.Unlock(keyspace.Id)

pkg/keyspace/keyspace_test.go

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,52 @@ func (suite *keyspaceTestSuite) TestCreateKeyspace() {
149149
re.Error(err)
150150
}
151151

152+
func makeCreateKeyspaceByIDRequests(count int) []*CreateKeyspaceByIDRequest {
153+
now := time.Now().Unix()
154+
requests := make([]*CreateKeyspaceByIDRequest, count)
155+
for i := range count {
156+
id := uint32(i + 1)
157+
requests[i] = &CreateKeyspaceByIDRequest{
158+
ID: &id,
159+
Config: map[string]string{
160+
testConfig1: "100",
161+
testConfig2: "200",
162+
},
163+
CreateTime: now,
164+
}
165+
}
166+
return requests
167+
}
168+
169+
func (suite *keyspaceTestSuite) TestCreateKeyspaceByID() {
170+
re := suite.Require()
171+
manager := suite.manager
172+
requests := makeCreateKeyspaceByIDRequests(10)
173+
174+
for i, request := range requests {
175+
created, err := manager.CreateKeyspaceByID(request)
176+
re.NoError(err)
177+
re.Equal(uint32(i+1), created.Id)
178+
checkCreateByIDRequest(re, request, created)
179+
180+
loaded, err := manager.LoadKeyspaceByID(*request.ID)
181+
re.NoError(err)
182+
checkCreateByIDRequest(re, request, loaded)
183+
184+
loaded, err = manager.LoadKeyspaceByID(created.Id)
185+
re.NoError(err)
186+
checkCreateByIDRequest(re, request, loaded)
187+
}
188+
189+
// Create a keyspace with existing ID must return error.
190+
_, err := manager.CreateKeyspaceByID(requests[0])
191+
re.Error(err)
192+
193+
// Create a keyspace with empty id must return error.
194+
_, err = manager.CreateKeyspaceByID(&CreateKeyspaceByIDRequest{})
195+
re.Error(err)
196+
}
197+
152198
func makeMutations() []*Mutation {
153199
return []*Mutation{
154200
{
@@ -343,6 +389,15 @@ func checkCreateRequest(re *require.Assertions, request *CreateKeyspaceRequest,
343389
re.Equal(request.Config, meta.GetConfig())
344390
}
345391

392+
// checkCreateByIDRequest verifies a keyspace meta matches a create request.
393+
func checkCreateByIDRequest(re *require.Assertions, request *CreateKeyspaceByIDRequest, meta *keyspacepb.KeyspaceMeta) {
394+
re.Equal(*request.ID, meta.GetId())
395+
re.Equal(request.CreateTime, meta.GetCreatedAt())
396+
re.Equal(request.CreateTime, meta.GetStateChangedAt())
397+
re.Equal(keyspacepb.KeyspaceState_ENABLED, meta.GetState())
398+
re.Equal(request.Config, meta.GetConfig())
399+
}
400+
346401
// checkMutations verifies that performing mutations on old config would result in new config.
347402
func checkMutations(re *require.Assertions, oldConfig, newConfig map[string]string, mutations []*Mutation) {
348403
// Copy oldConfig to expected to avoid modifying its content.

pkg/schedule/checker/rule_checker_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2079,6 +2079,7 @@ func (suite *ruleCheckerTestAdvancedSuite) TestReplaceAnExistingPeerCases() {
20792079
}
20802080

20812081
func (suite *ruleCheckerTestSuite) TestRemoveOrphanPeer() {
2082+
re := suite.Require()
20822083
suite.cluster.AddLabelsStore(1, 1, map[string]string{"zone": "z1", "host": "h1"})
20832084
suite.cluster.AddLabelsStore(2, 1, map[string]string{"zone": "z1", "host": "h1"})
20842085
suite.cluster.AddLabelsStore(3, 1, map[string]string{"zone": "z1", "host": "h1"})
@@ -2104,14 +2105,14 @@ func (suite *ruleCheckerTestSuite) TestRemoveOrphanPeer() {
21042105
// case1: regionA has 3 peers but not extra peer can be removed, so it needs to add peer first
21052106
suite.cluster.AddLeaderRegionWithRange(1, "200", "300", 1, 2, 3)
21062107
op := suite.rc.Check(suite.cluster.GetRegion(1))
2107-
suite.NotNil(op)
2108-
suite.Equal("add-rule-peer", op.Desc())
2108+
re.NotNil(op)
2109+
re.Equal("add-rule-peer", op.Desc())
21092110

21102111
// case2: regionB has 4 peers and one extra peer can be removed, so it needs to remove extra peer first
21112112
suite.cluster.AddLeaderRegionWithRange(2, "300", "400", 1, 2, 3, 4)
21122113
op = suite.rc.Check(suite.cluster.GetRegion(2))
2113-
suite.NotNil(op)
2114-
suite.Equal("remove-orphan-peer", op.Desc())
2114+
re.NotNil(op)
2115+
re.Equal("remove-orphan-peer", op.Desc())
21152116
}
21162117

21172118
func (suite *ruleCheckerTestSuite) TestIssue7808() {

pkg/schedule/operator/operator_test.go

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,7 @@ func (suite *operatorTestSuite) TestRecord() {
542542
}
543543

544544
func (suite *operatorTestSuite) TestToJSONObject() {
545+
re := suite.Require()
545546
steps := []OpStep{
546547
AddPeer{ToStore: 1, PeerID: 1},
547548
TransferLeader{FromStore: 3, ToStore: 1},
@@ -550,28 +551,28 @@ func (suite *operatorTestSuite) TestToJSONObject() {
550551
op := NewTestOperator(101, &metapb.RegionEpoch{}, OpLeader|OpRegion, steps...)
551552
op.Start()
552553
obj := op.ToJSONObject()
553-
suite.Equal("test", obj.Desc)
554-
suite.Equal("test", obj.Brief)
555-
suite.Equal(uint64(101), obj.RegionID)
556-
suite.Equal(OpLeader|OpRegion, obj.Kind)
557-
suite.Equal("12m0s", obj.Timeout)
558-
suite.Equal(STARTED, obj.Status)
554+
re.Equal("test", obj.Desc)
555+
re.Equal("test", obj.Brief)
556+
re.Equal(uint64(101), obj.RegionID)
557+
re.Equal(OpLeader|OpRegion, obj.Kind)
558+
re.Equal("12m0s", obj.Timeout)
559+
re.Equal(STARTED, obj.Status)
559560

560561
// Test SUCCESS status.
561562
region := newTestRegion(1, 1, [2]uint64{1, 1}, [2]uint64{2, 2})
562-
suite.Nil(op.Check(region))
563-
suite.Equal(SUCCESS, op.Status())
563+
re.Nil(op.Check(region))
564+
re.Equal(SUCCESS, op.Status())
564565
obj = op.ToJSONObject()
565-
suite.Equal(SUCCESS, obj.Status)
566+
re.Equal(SUCCESS, obj.Status)
566567

567568
// Test TIMEOUT status.
568569
steps = []OpStep{TransferLeader{FromStore: 2, ToStore: 1}}
569570
op = NewTestOperator(1, &metapb.RegionEpoch{}, OpLeader, steps...)
570571
op.Start()
571572
op.SetStatusReachTime(STARTED, op.GetStartTime().Add(-FastStepWaitTime-time.Second))
572-
suite.True(op.CheckTimeout())
573+
re.True(op.CheckTimeout())
573574
obj = op.ToJSONObject()
574-
suite.Equal(TIMEOUT, obj.Status)
575+
re.Equal(TIMEOUT, obj.Status)
575576
}
576577

577578
func TestOperatorCheckConcurrently(t *testing.T) {

pkg/schedule/schedulers/evict_slow_trend.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ import (
3939
)
4040

4141
const (
42-
alterEpsilon = 1e-9
43-
minReCheckDurationGap = 120 // default gap for re-check the slow node, unit: s
44-
defaultRecoveryDurationGap = 600 // default gap for recovery, unit: s.
42+
alterEpsilon = 1e-9
43+
minReCheckDurationGap = 120 // default gap for re-check the slow node, unit: s
44+
// We use 1800 seconds as the default gap for recovery, which is 30 minutes.
45+
// This is based on the SLA level reflected by AWS EBS. And we can adjust it later if needed.
46+
defaultRecoveryDurationGap = 1800 // default gap for recovery, unit: s.
4547
)
4648

4749
type slowCandidate struct {

0 commit comments

Comments
 (0)