diff --git a/pkg/ring-controller/ranktable/v2/ranktable.go b/pkg/ring-controller/ranktable/v2/ranktable.go index b527603a6e189804c1f8a38257a2279c2fedd4c5..0015c670a6b12a27355c6d252689dfd21d0e6c86 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{} }