From d4858bcb610937b81a45fe6ed91e11ac13f8360a Mon Sep 17 00:00:00 2001 From: lhy1024 Date: Tue, 22 Oct 2024 11:33:01 +0800 Subject: [PATCH] fix lint Signed-off-by: lhy1024 --- plugin/scheduler_example/evict_leader.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/scheduler_example/evict_leader.go b/plugin/scheduler_example/evict_leader.go index 12e1417594d..7164f36b1bb 100644 --- a/plugin/scheduler_example/evict_leader.go +++ b/plugin/scheduler_example/evict_leader.go @@ -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 @@ -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 @@ -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 }