From e867c1d7e7e87a543b298ac8e95c29dfaca5e81f Mon Sep 17 00:00:00 2001 From: shepherd cheung <1220798123@qq.com> Date: Tue, 27 Aug 2024 21:29:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=20Modification=E3=80=91=E4=BF=AE=E5=A4=8Dpod=E7=BA=A7?= =?UTF-8?q?=E9=87=8D=E8=B0=83=E5=BA=A6=E4=B8=8B=E6=97=A0=E6=B3=95=E7=94=9F?= =?UTF-8?q?=E6=88=90ranktable=20=E3=80=90=E4=BF=AE=E6=94=B9=E4=BA=BA=20Mod?= =?UTF-8?q?ifier=E3=80=91Atlas=5Fzxp=20=E3=80=90=E8=AF=84=E5=AE=A1?= =?UTF-8?q?=E4=BA=BA=20Reviewer=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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/ring-controller/ranktable/v2/ranktable.go b/pkg/ring-controller/ranktable/v2/ranktable.go index b527603..0015c67 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" @@ -116,5 +117,5 @@ 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) + r.Servers = &sync.Map{} } -- Gitee From e83345e0dd74bf5d6a747fd78b3e97e87277e13a Mon Sep 17 00:00:00 2001 From: shepherd cheung <1220798123@qq.com> Date: Tue, 27 Aug 2024 21:30:10 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=20Modification=E3=80=91=E4=BF=AE=E5=A4=8Dpod=E7=BA=A7?= =?UTF-8?q?=E9=87=8D=E8=B0=83=E5=BA=A6=E4=B8=8B=E6=97=A0=E6=B3=95=E7=94=9F?= =?UTF-8?q?=E6=88=90ranktable=20=E3=80=90=E4=BF=AE=E6=94=B9=E4=BA=BA=20Mod?= =?UTF-8?q?ifier=E3=80=91Atlas=5Fzxp=20=E3=80=90=E8=AF=84=E5=AE=A1?= =?UTF-8?q?=E4=BA=BA=20Reviewer=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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ring-controller/ranktable/v2/ranktable.go b/pkg/ring-controller/ranktable/v2/ranktable.go index 0015c67..10599f1 100644 --- a/pkg/ring-controller/ranktable/v2/ranktable.go +++ b/pkg/ring-controller/ranktable/v2/ranktable.go @@ -116,6 +116,6 @@ func (r *RankTable) GetPodNum() int { } // DeletePod delete pod in server when pod is deleted -func (r *RankTable) DeletePod(podID types.UID) { +func (r *RankTable) DeletePod(_ types.UID) { r.Servers = &sync.Map{} } -- Gitee