Commit 59b88d7a authored by k8s-merge-robot's avatar k8s-merge-robot Committed by GitHub

Merge pull request #26925 from ZTE-PaaS/249043822-patch-1

Automatic merge from submit-queue optimize deleteFromIndices method of thread_safe_store As all methods of thread_safe_store are threadsafe, so i think, in deleteFromIndices method, if the index is nil, need not run the for structure below
parents 601173c2 5dbf21aa
......@@ -261,12 +261,13 @@ func (c *threadSafeMap) deleteFromIndices(obj interface{}, key string) error {
}
index := c.indices[name]
if index == nil {
continue
}
for _, indexValue := range indexValues {
if index != nil {
set := index[indexValue]
if set != nil {
set.Delete(key)
}
set := index[indexValue]
if set != nil {
set.Delete(key)
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment