TaiJuWu opened a new pull request, #24168:
URL: https://github.com/apache/kafka/pull/24168

   When a share group subscribes to a new topic, the group coordinator 
initializes its share partitions with start offset -1, so that the partition 
leader applies `share.auto.offset.reset`. If the initialization does not 
complete within `group.share.initialize.retry.interval.ms`, it is retried. The 
retry treated the partitions as new partitions of a known topic and used start 
offset 0. The retry has a higher state epoch, so the share coordinator keeps 
it, and a group with `share.auto.offset.reset=latest` reads the topic from the 
beginning.
   
   This PR decides the start offset per partition. A partition starts at 0 only 
if its topic is already initialized, or if the topic is still initializing and 
the partition is not part of that initialization. A retry of a partition which 
is still initializing uses -1, the same as its first attempt, so the result 
does not depend on which request is applied.
   
   The integration test stops the broker hosting the share coordinator while a 
new topic is being initialized, and checks that the records written before the 
subscription are not delivered. The unit tests check the start offset of the 
retried request.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to