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

   A static member that joins with epoch 0 while the coordinator still
   considers it active gets UNRELEASED_INSTANCE_ID, which is fatal for the
   Java client. This happens when the response to its join is lost or after
   a FENCED_MEMBER_EPOCH error, because the client keeps its member id and
   rejoins with it. A dynamic member in the same situation simply gets its
   assignment back.
   
   The root cause is that the coordinator does not enforce that a member
   id keeps its instance id. On a join, a known member id may come with any
   instance id, so the coordinator cannot tell that the same member is
   back and treats it as a replacement of the instance id's owner, itself.
   
   This patch rejects a join that changes the instance id of an existing
   member with INVALID_REQUEST. A known member id on a join is then always
   the static member owning the instance id, and it is handled in place:
   after a leave with epoch -2 its epoch is reset and it is reconciled,
   otherwise it gets its current state back like a dynamic member. This
   also removes the tombstone-and-rewrite of a member rejoining with its
   own id after leaving. Consumer and streams groups are updated alike.
   
   Tests cover every join case for both protocols.
   
   


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