diff --git a/plugin/scheduler_example/evict_leader.go b/plugin/scheduler_example/evict_leader.go index 0f0388a4ad6..b40633dfb2e 100644 --- a/plugin/scheduler_example/evict_leader.go +++ b/plugin/scheduler_example/evict_leader.go @@ -132,8 +132,7 @@ func (conf *evictLeaderSchedulerConfig) Persist() error { if err != nil { return err } - conf.storage.SaveScheduleConfig(name, data) - return nil + return conf.storage.SaveScheduleConfig(name, data) } func (conf *evictLeaderSchedulerConfig) getScheduleName() string { diff --git a/server/schedulers/evict_leader.go b/server/schedulers/evict_leader.go index db64f99057c..de3028caee5 100644 --- a/server/schedulers/evict_leader.go +++ b/server/schedulers/evict_leader.go @@ -120,8 +120,7 @@ func (conf *evictLeaderSchedulerConfig) Persist() error { if err != nil { return err } - conf.storage.SaveScheduleConfig(name, data) - return nil + return conf.storage.SaveScheduleConfig(name, data) } func (conf *evictLeaderSchedulerConfig) getSchedulerName() string { diff --git a/server/schedulers/grant_leader.go b/server/schedulers/grant_leader.go index 8109f8d497a..30e117e6f3b 100644 --- a/server/schedulers/grant_leader.go +++ b/server/schedulers/grant_leader.go @@ -114,8 +114,7 @@ func (conf *grantLeaderSchedulerConfig) Persist() error { if err != nil { return err } - conf.storage.SaveScheduleConfig(name, data) - return nil + return conf.storage.SaveScheduleConfig(name, data) } func (conf *grantLeaderSchedulerConfig) getSchedulerName() string { diff --git a/server/schedulers/scatter_range.go b/server/schedulers/scatter_range.go index 06640d0fbb4..ea08e5a00b0 100644 --- a/server/schedulers/scatter_range.go +++ b/server/schedulers/scatter_range.go @@ -110,8 +110,7 @@ func (conf *scatterRangeSchedulerConfig) Persist() error { if err != nil { return err } - conf.storage.SaveScheduleConfig(name, data) - return nil + return conf.storage.SaveScheduleConfig(name, data) } func (conf *scatterRangeSchedulerConfig) GetRangeName() string {