smjn commented on PR #24168:
URL: https://github.com/apache/kafka/pull/24168#issuecomment-6851888970
@TaiJuWu Thanks for the PR
There seems to be an issue. If a new partition is added to a topic which is
already subscribed to the group but not yet initialized, the new logic will
incorrectly set the offset to -1 as well.
Consider topic - tp with partition {0} -> heartbeat subscribed group sg to
tp and initialize(startOffset = -1) is called -> coordinator call fails -> new
partition {1} is added to topic -> the retry call will include {0,1} but will
send -1 for both which is not expected. It should send startOffset 0 for {1} as
this part was added to a topic already subscribed to the group. This can be
simulated by the new test if you do 2 retries.
We might need to store the startOffset for previous partition calls and not
guess it.
--
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]