Skip to content

Commit

Permalink
cluster: remove unnecessary get store (#9002)
Browse files Browse the repository at this point in the history
ref #9003

Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx authored Jan 17, 2025
1 parent 9805a95 commit a99abe3
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)
// Supply NodeState in the response to help the store handle special cases
// more conveniently, such as avoiding calling `remove_peer` redundantly under
// NodeState_Removing.
Expand Down

0 comments on commit a99abe3

Please sign in to comment.