diff --git a/server/api/hot_status.go b/server/api/hot_status.go index 0296155596b..749a371300a 100644 --- a/server/api/hot_status.go +++ b/server/api/hot_status.go @@ -210,7 +210,7 @@ func (h *hotStatusHandler) GetHotBuckets(w http.ResponseWriter, r *http.Request) ids[i] = id } } - stats := h.Handler.GetHotBuckets() + stats := h.Handler.GetHotBuckets(ids...) ret := HotBucketsResponse{} for regionID, stats := range stats { ret[regionID] = make([]*HotBucketsItem, len(stats)) diff --git a/server/cluster/cluster_test.go b/server/cluster/cluster_test.go index 35e2ba9fa9a..7bb24d79cf1 100644 --- a/server/cluster/cluster_test.go +++ b/server/cluster/cluster_test.go @@ -1348,7 +1348,6 @@ func TestSyncConfig(t *testing.T) { if v.updated { re.True(switchRaftV2) tc.opt.UseRaftV2() - re.EqualValues(0, tc.opt.GetMaxMergeRegionSize()) re.EqualValues(512, tc.opt.GetMaxMovableHotPeerSize()) success, switchRaftV2 = syncConfig(tc.storeConfigManager, tc.GetStores()) re.True(success) diff --git a/server/config/persist_options.go b/server/config/persist_options.go index 81484e12607..8d6d1b6b6bc 100644 --- a/server/config/persist_options.go +++ b/server/config/persist_options.go @@ -202,13 +202,7 @@ 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 -func (o *PersistOptions) UseRaftV2() { - v := o.GetScheduleConfig().Clone() - v.MaxMergeRegionSize = 0 - o.SetScheduleConfig(v) -} +func (o *PersistOptions) UseRaftV2() {} const ( maxSnapshotCountKey = "schedule.max-snapshot-count" diff --git a/tests/pdctl/hot/hot_test.go b/tests/pdctl/hot/hot_test.go index 4e926687223..2dfa89acb52 100644 --- a/tests/pdctl/hot/hot_test.go +++ b/tests/pdctl/hot/hot_test.go @@ -283,6 +283,13 @@ func TestHotWithStoreID(t *testing.T) { re.Equal(buckets.GetStats().ReadKeys[0]/interval, item.ReadKeys) re.Equal(buckets.GetStats().WriteBytes[0]/interval, item.WriteBytes) re.Equal(buckets.GetStats().WriteKeys[0]/interval, item.WriteKeys) + + args = []string{"-u", pdAddr, "hot", "buckets", "2"} + output, err = pdctl.ExecuteCommand(cmd, args...) + re.NoError(err) + hotBuckets = api.HotBucketsResponse{} + re.NoError(json.Unmarshal(output, &hotBuckets)) + re.Nil(hotBuckets[2]) } func TestHistoryHotRegions(t *testing.T) {