Skip to content

Commit

Permalink
server: fix the issue that panic when collecting hot-cache metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
nolouch committed May 25, 2018
1 parent 534bdcf commit 28243b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions server/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,8 @@ func (c *clusterInfo) collectMetrics() {
defer c.RUnlock()
c.regionStats.Collect()
c.labelLevelStats.Collect()
// collect hot cache metrics
c.HotCache.CollectMetrics(c.Stores)
}

func (c *clusterInfo) GetRegionStatsByType(typ regionStatisticType) []*core.RegionInfo {
Expand Down
2 changes: 0 additions & 2 deletions server/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,6 @@ func (c *coordinator) collectHotSpotMetrics() {
}
}

// collect hot cache metrics
c.cluster.HotCache.CollectMetrics(c.cluster.Stores)
}

func (c *coordinator) shouldRun() bool {
Expand Down

0 comments on commit 28243b5

Please sign in to comment.