Rollback config in store when kv.persist failed #1475
Labels
good first issue
Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.
type/enhancement
The issue or PR belongs to an enhancement.
I am reading the following code
https://github.com/pingcap/pd/blob/f72cc23e5765b32c0d503e4fecd4b37fea44c98f/server/server.go#L531-L542
If
s.scheduleOpt.persist(s.kv)
returnserr
, it will not rollback to the old config inscheduleOpt
Maybe we'd better add the rollback code? just like this:
The text was updated successfully, but these errors were encountered: