@@ -765,19 +765,19 @@ type HistoryHotRegions struct {
765
765
// HistoryHotRegion records each hot region's statistics.
766
766
// it's the response of PD.
767
767
type HistoryHotRegion struct {
768
- UpdateTime int64 `json:"update_time,omitempty "`
769
- RegionID uint64 `json:"region_id,omitempty "`
770
- StoreID uint64 `json:"store_id,omitempty "`
771
- PeerID uint64 `json:"peer_id,omitempty "`
772
- IsLearner bool `json:"is_learner,omitempty "`
773
- IsLeader bool `json:"is_leader,omitempty "`
774
- HotRegionType string `json:"hot_region_type,omitempty "`
775
- HotDegree int64 `json:"hot_degree,omitempty "`
776
- FlowBytes float64 `json:"flow_bytes,omitempty "`
777
- KeyRate float64 `json:"key_rate,omitempty "`
778
- QueryRate float64 `json:"query_rate,omitempty "`
779
- StartKey string `json:"start_key,omitempty "`
780
- EndKey string `json:"end_key,omitempty "`
768
+ UpdateTime int64 `json:"update_time"`
769
+ RegionID uint64 `json:"region_id"`
770
+ StoreID uint64 `json:"store_id"`
771
+ PeerID uint64 `json:"peer_id"`
772
+ IsLearner bool `json:"is_learner"`
773
+ IsLeader bool `json:"is_leader"`
774
+ HotRegionType string `json:"hot_region_type"`
775
+ HotDegree int64 `json:"hot_degree"`
776
+ FlowBytes float64 `json:"flow_bytes"`
777
+ KeyRate float64 `json:"key_rate"`
778
+ QueryRate float64 `json:"query_rate"`
779
+ StartKey string `json:"start_key"`
780
+ EndKey string `json:"end_key"`
781
781
}
782
782
783
783
func (e * hotRegionsHistoryRetriver ) initialize (ctx context.Context , sctx sessionctx.Context ) ([]chan hotRegionsResult , error ) {
@@ -901,7 +901,8 @@ func (e *hotRegionsHistoryRetriver) retrieve(ctx context.Context, sctx sessionct
901
901
Store : tikvStore ,
902
902
RegionCache : tikvStore .GetRegionCache (),
903
903
}
904
- tables := tikvHelper .GetTablesInfoWithKeyRange (allSchemas )
904
+ schemas := tikvHelper .FilterMemDBs (allSchemas )
905
+ tables := tikvHelper .GetTablesInfoWithKeyRange (schemas )
905
906
for e .heap .Len () > 0 && len (finalRows ) < hotRegionsHistoryBatchSize {
906
907
minTimeItem := heap .Pop (e .heap ).(hotRegionsResult )
907
908
rows , err := e .getHotRegionRowWithSchemaInfo (minTimeItem .messages .HistoryHotRegion [0 ], tikvHelper , tables , tz )
0 commit comments