Skip to content

Commit c55e66b

Browse files
Merge pull request #108680 from kidlj/fix_cache_index_comments
make comments of `(c *threadSafeMap) updateIndices` optimization code more accurate Kubernetes-commit: 29528a266a42bb34768db6944367946df5b0dcf6
2 parents dedf7ce + 6b59aa0 commit c55e66b

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)