Skip to content

Commit

Permalink
remove unnecessary get store
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed Jan 16, 2025
1 parent ad172c7 commit 8468beb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions server/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -1040,9 +1040,7 @@ func (c *RaftCluster) HandleStoreHeartbeat(heartbeat *pdpb.StoreHeartbeatRequest
newStore = newStore.Clone(core.SetLastPersistTime(nowTime))
}
}
if store := c.GetStore(storeID); store != nil {
statistics.UpdateStoreHeartbeatMetrics(store)
}
statistics.UpdateStoreHeartbeatMetrics(store)
c.PutStore(newStore)
var (
regions map[uint64]*core.RegionInfo
Expand Down

0 comments on commit 8468beb

Please sign in to comment.