Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: let TestEvictLeaderScheduler run in two modes (#8663) #8665

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
487 changes: 487 additions & 0 deletions pkg/schedule/schedulers/evict_leader.go

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions server/schedulers/grant_leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,19 @@ func (handler *grantLeaderHandler) UpdateConfig(w http.ResponseWriter, r *http.R
handler.config.BuildWithArgs(args)
err := handler.config.Persist()
if err != nil {
<<<<<<< HEAD:server/schedulers/grant_leader.go
handler.config.removeStore(id)
=======
handler.config.Lock()
handler.config.cluster.ResumeLeaderTransfer(id)
handler.config.Unlock()
handler.rd.JSON(w, http.StatusBadRequest, err.Error())
return
}
err = handler.config.persist()
if err != nil {
_, _ = handler.config.removeStore(id)
>>>>>>> f3e9d9ad0 (*: let TestEvictLeaderScheduler run in two modes (#8663)):pkg/schedule/schedulers/grant_leader.go
handler.rd.JSON(w, http.StatusInternalServerError, err.Error())
return
}
Expand Down
Loading
Loading