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

   Thanks @chia7712 for the review!
   
   > log-start-offset-checkpoint is missing and remote storage is enabled. The 
logStartOffset will be set to zero, and it seems be a potential issue since the 
ListOffsetRequest could get incorrect result
   
   Most of the time when the follower joins the ISR, it updates the 
log-start-offset and high-watermark from the leader FETCH response. The issue 
can happen only when the follower gets elected as leader before updating it's 
state as mentioned in the summary/comments. 
   
   When the `log-start-offset-checkpoint` file is missing:
   1.  For normal topic, the log-start-offset will be set to base-offset of the 
first log segment so there is no issue. Since the data is there, read won't 
fail.
   2. For remote topic, the log-start-offset will be stale for sometime until 
the RemoteLogManager 
[updates](https://github.com/apache/kafka/blob/trunk/core/src/main/java/kafka/log/remote/RemoteLogManager.java#L671)
 it, so the issue is intermittent and self-recovers.
   
   > replication-offset-checkpoint is missing and remote storage is enabled. 
This is what your described. The HWM is pointed to middle of tiered storage and 
so it causes error when fetching records from local segments.
   
   This is not an issue for normal topic. But for cluster enabled with 
remote-storage, if the issue happens even on 1 partition, then it starts to 
affect *subset* of topics.  Controller batches the partitions in the 
LeaderAndIsr request. If the broker fails to process the LISR for one 
partition, then the remaining partition in that batch won't be processed. The 
producers producing to those topics will start receiving 
NOT_LEADER_FOR_PARTITION error.
   


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