From 089b046059e4d1ff532a1161691e2015ebef2085 Mon Sep 17 00:00:00 2001 From: shepherd cheung <1220798123@qq.com> Date: Tue, 27 Aug 2024 21:24:25 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=20Modification=E3=80=91=E4=BF=AE=E5=A4=8Dpod=E7=BA=A7=E9=87=8D?= =?UTF-8?q?=E8=B0=83=E5=BA=A6=E4=B8=8B=E6=97=A0=E6=B3=95=E7=94=9F=E6=88=90?= =?UTF-8?q?ranktable=20=E3=80=90=E4=BF=AE=E6=94=B9=E4=BA=BA=20Modifier?= =?UTF-8?q?=E3=80=91Atlas=5Fzxp=20=E3=80=90=E8=AF=84=E5=AE=A1=E4=BA=BA=20R?= =?UTF-8?q?eviewer=E3=80=91Atlas=5Fkfa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/ring-controller/ranktable/v2/ranktable.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/ring-controller/ranktable/v2/ranktable.go b/pkg/ring-controller/ranktable/v2/ranktable.go index b527603..10599f1 100644 --- a/pkg/ring-controller/ranktable/v2/ranktable.go +++ b/pkg/ring-controller/ranktable/v2/ranktable.go @@ -19,6 +19,7 @@ import ( "fmt" "sort" "strconv" + "sync" apiCoreV1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" @@ -115,6 +116,6 @@ func (r *RankTable) GetPodNum() int { } // DeletePod delete pod in server when pod is deleted -func (r *RankTable) DeletePod(podID types.UID) { - r.Servers.Delete(podID) +func (r *RankTable) DeletePod(_ types.UID) { + r.Servers = &sync.Map{} } -- Gitee