Skip to content

Commit 6b59aa0

Browse files
Jian Lik8s-publishing-bot
authored andcommitted
make comments of updateIndices optimization code more accurate
Kubernetes-commit: 0eae1f3addbd044793dac89f9e097e5f4c6fb2aa
1 parent dedf7ce commit 6b59aa0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/cache/thread_safe_store.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,14 +281,14 @@ func (c *threadSafeMap) updateIndices(oldObj interface{}, newObj interface{}, ke
281281
}
282282

283283
for _, value := range oldIndexValues {
284-
// We optimize for the most common case where index returns a single value.
284+
// We optimize for the most common case where indexFunc returns a single value.
285285
if len(indexValues) == 1 && value == indexValues[0] {
286286
continue
287287
}
288288
c.deleteKeyFromIndex(key, value, index)
289289
}
290290
for _, value := range indexValues {
291-
// We optimize for the most common case where index returns a single value.
291+
// We optimize for the most common case where indexFunc returns a single value.
292292
if len(oldIndexValues) == 1 && value == oldIndexValues[0] {
293293
continue
294294
}

0 commit comments

Comments
 (0)