Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <[email protected]>
  • Loading branch information
lhy1024 committed Oct 22, 2024
1 parent 5da06ef commit d4858bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugin/scheduler_example/evict_leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ func (handler *evictLeaderHandler) updateConfig(w http.ResponseWriter, r *http.R
err := handler.config.BuildWithArgs(args)
if err != nil {
handler.config.mu.Lock()
handler.config.cluster.ResumeLeaderTransfer(id)
handler.config.cluster.ResumeLeaderTransfer(id, constant.In)
handler.config.mu.Unlock()
handler.rd.JSON(w, http.StatusBadRequest, err.Error())
return
Expand All @@ -285,7 +285,7 @@ func (handler *evictLeaderHandler) updateConfig(w http.ResponseWriter, r *http.R
if err != nil {
handler.config.mu.Lock()
delete(handler.config.StoreIDWitRanges, id)
handler.config.cluster.ResumeLeaderTransfer(id)
handler.config.cluster.ResumeLeaderTransfer(id, constant.In)
handler.config.mu.Unlock()
handler.rd.JSON(w, http.StatusInternalServerError, err.Error())
return
Expand Down Expand Up @@ -318,7 +318,7 @@ func (handler *evictLeaderHandler) deleteConfig(w http.ResponseWriter, r *http.R

if err := handler.config.Persist(); err != nil {
handler.config.StoreIDWitRanges[id] = ranges
_ = handler.config.cluster.PauseLeaderTransfer(id)
_ = handler.config.cluster.PauseLeaderTransfer(id, constant.In)
handler.rd.JSON(w, http.StatusInternalServerError, err.Error())
return
}
Expand Down

0 comments on commit d4858bc

Please sign in to comment.