Skip to content

Commit

Permalink
address the comments
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed Oct 10, 2019
1 parent a7c7d81 commit 0189cd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions server/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func (c *RaftCluster) runBackgroundJobs(interval time.Duration) {
for {
select {
case <-c.quit:
log.Info("metrics are resetting")
log.Info("metrics are reset")
c.resetMetrics()
log.Info("background jobs has been stopped")
return
Expand Down Expand Up @@ -1020,7 +1020,7 @@ func (c *RaftCluster) resetMetrics() {
statsMap := statistics.NewStoreStatisticsMap(c.opt, c.GetNamespaceClassifier())
stores := c.GetStores()
for _, s := range stores {
statsMap.ResetStore(s, c.storesStats)
statsMap.ResetStore(s)
}
statsMap.Reset()

Expand Down
2 changes: 1 addition & 1 deletion server/statistics/store_collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ func (m *storeStatisticsMap) Observe(store *core.StoreInfo, stats *StoresStats)
stat.Observe(store, stats)
}

func (m *storeStatisticsMap) ResetStore(store *core.StoreInfo, stats *StoresStats) {
func (m *storeStatisticsMap) ResetStore(store *core.StoreInfo) {
namespace := m.classifier.GetStoreNamespace(store)
stat, ok := m.stats[namespace]
if !ok {
Expand Down

0 comments on commit 0189cd5

Please sign in to comment.