Skip to content

Commit

Permalink
scheduler: fix the issue that some scheduler persist config without s…
Browse files Browse the repository at this point in the history
…olving error (#2817) (#2818)

Signed-off-by: ti-srebot <[email protected]>
  • Loading branch information
ti-srebot authored Sep 1, 2020
1 parent 57f6db1 commit 928c257
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions plugin/scheduler_example/evict_leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions server/schedulers/evict_leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions server/schedulers/grant_leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions server/schedulers/scatter_range.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 928c257

Please sign in to comment.