Skip to content

Commit

Permalink
cluster: no more redundant etcd writes when ReportMinResolvedTS is …
Browse files Browse the repository at this point in the history
…called (#5966)

close #5965

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
  • Loading branch information
HunDunDM and ti-chi-bot authored Feb 13, 2023
1 parent b719db2 commit bcdaf48
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions server/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -2326,11 +2326,9 @@ func (c *RaftCluster) SetMinResolvedTS(storeID, minResolvedTS uint64) error {
return errs.ErrStoreNotFound.FastGenByArgs(storeID)
}

newStore := store.Clone(
core.SetMinResolvedTS(minResolvedTS),
)

return c.putStoreLocked(newStore)
newStore := store.Clone(core.SetMinResolvedTS(minResolvedTS))
c.core.PutStore(newStore)
return nil
}

func (c *RaftCluster) checkAndUpdateMinResolvedTS() (uint64, bool) {
Expand Down

0 comments on commit bcdaf48

Please sign in to comment.