kamalcph commented on PR #14349:
URL: https://github.com/apache/kafka/pull/14349#issuecomment-1710450437

   > My point is, should we check for leadership even before updating the log 
start offset?
   
   yes, this is the expectation and being done inside the 
`handleLogStartOffsetUpdate` method:
   
   ```java
   public void handleLogStartOffsetUpdate(TopicPartition topicPartition, long 
remoteLogStartOffset) {
       if (isLeader()) {
           logger.debug("Updating {} with remoteLogStartOffset: {}", 
topicPartition, remoteLogStartOffset);
           updateRemoteLogStartOffset.accept(topicPartition, 
remoteLogStartOffset);
       }
   }
   ```
   


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