divijvaidya commented on code in PR #13850: URL: https://github.com/apache/kafka/pull/13850#discussion_r1229196664
########## core/src/main/scala/kafka/log/remote/RemoteIndexCache.scala: ########## @@ -152,8 +194,7 @@ class RemoteIndexCache(maxSize: Int = 1024, remoteStorageManager: RemoteStorageM val txnIndex = new TransactionIndex(offset, txnIndexFile) txnIndex.sanityCheck() - val entry = new Entry(offsetIndex, timeIndex, txnIndex) - entries.put(uuid, entry) + internalCache.put(uuid, new Entry(offsetIndex, timeIndex, txnIndex)) Review Comment: Thank you for the suggestion. It is guaranteed that this place in the code (initialization) is always invoked by a single thread. At other place (getIndexEntry()) which requires thread safety, I am using the `get(key, mappingFunction)`. -- 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