Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: raftv2 use enable bucket split by default (#6432) #6435

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions server/cluster/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1336,8 +1336,8 @@ func TestSyncConfig(t *testing.T) {
if v.updated {
re.True(switchRaftV2)
tc.opt.UseRaftV2()
re.EqualValues(0, tc.opt.GetScheduleConfig().MaxMergeRegionSize)
re.EqualValues(math.MaxInt64, tc.opt.GetScheduleConfig().MaxMovableHotPeerSize)
re.EqualValues(0, tc.opt.GetMaxMergeRegionSize())
re.EqualValues(512, tc.opt.GetMaxMovableHotPeerSize())
success, switchRaftV2 = syncConfig(tc.storeConfigManager, tc.GetStores())
re.True(success)
re.False(switchRaftV2)
Expand Down
3 changes: 0 additions & 3 deletions server/config/persist_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package config
import (
"context"
"fmt"
"math"
"reflect"
"strconv"
"strings"
Expand Down Expand Up @@ -200,11 +199,9 @@ func (o *PersistOptions) SetMaxReplicas(replicas int) {
// UseRaftV2 set some config for raft store v2 by default temporary.
// todo: remove this after raft store support this.
// disable merge check
// disable split buckets
func (o *PersistOptions) UseRaftV2() {
v := o.GetScheduleConfig().Clone()
v.MaxMergeRegionSize = 0
v.MaxMovableHotPeerSize = math.MaxInt64
o.SetScheduleConfig(v)
}

Expand Down