junrao commented on code in PR #19961:
URL: https://github.com/apache/kafka/pull/19961#discussion_r2193466214


##########
storage/src/main/java/org/apache/kafka/storage/internals/log/AbstractIndex.java:
##########
@@ -47,7 +48,10 @@ private enum SearchResultType {
 
     private static final Logger log = 
LoggerFactory.getLogger(AbstractIndex.class);
 
-    protected final ReentrantLock lock = new ReentrantLock();
+    // Serializes all index operations that mutate internal state

Review Comment:
   This is a minor thing. It would be useful to add a comment on why the reader 
doesn't need to take this lock.



-- 
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

Reply via email to