Skip to content

Commit

Permalink
This is an automated cherry-pick of tikv#8663
Browse files Browse the repository at this point in the history
ref tikv#8619

Signed-off-by: ti-chi-bot <[email protected]>
  • Loading branch information
rleungx authored and ti-chi-bot committed Sep 24, 2024
1 parent 69d2142 commit 70f8f40
Show file tree
Hide file tree
Showing 8 changed files with 5,553 additions and 0 deletions.
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 @@ -289,7 +289,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

0 comments on commit 70f8f40

Please sign in to comment.