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) (#5978)

close #5965, ref #5966

Signed-off-by: HunDunDM <hundundm@gmail.com>

Co-authored-by: HunDunDM <hundundm@gmail.com>
  • Loading branch information
ti-chi-bot and HunDunDM committed Feb 14, 2023
1 parent 5222943 commit 8bc2e28
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 @@ -2111,11 +2111,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 8bc2e28

Please sign in to comment.