ben-manes commented on code in PR #13850: URL: https://github.com/apache/kafka/pull/13850#discussion_r1229081529
########## core/src/main/scala/kafka/log/remote/RemoteIndexCache.scala: ########## @@ -136,12 +176,14 @@ class RemoteIndexCache(maxSize: Int = 1024, remoteStorageManager: RemoteStorageM val offset = name.substring(0, firstIndex).toInt val uuid = Uuid.fromString(name.substring(firstIndex + 1, name.lastIndexOf('_'))) - if(!entries.containsKey(uuid)) { + if (internalCache.getIfPresent(uuid) == null) { Review Comment: did you mean `internalCache.asMap().containsKey(uuid)`? That would be an existence check, as this is an entry read so it results in a policy hit/miss behavior. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org