Lianet Magrans created KAFKA-21453:
--------------------------------------

             Summary: Async consumer poll may throw 
UnknownMemberIdException/StaleMemberEpochException if fenced while OffsetFetch 
in-flight
                 Key: KAFKA-21453
                 URL: https://issues.apache.org/jira/browse/KAFKA-21453
             Project: Kafka
          Issue Type: Bug
          Components: clients
            Reporter: Lianet Magrans
             Fix For: 4.5.0


When the async consumer initializes positions with OffsetFetch, it includes the 
member ID and epoch. If the member gets fenced while that request is in flight, 
the request fails (UnknownMemberId/StaleMemberEpoch) and the error is wrongly 
thrown from consumer.poll. 

Under this case, I expect that the partitions should remain without position, 
the consumer should handle the fencing as usual (invoke onPartitionsLost and 
rejoin on next poll).

With that, positions should be successfully retrieved after the member rejoins 
(positions are continuously updated as needed on poll)

For this to happen it requires fencing happening while the OffsetFetch for 
positions is in-flight, because if the client knows it's fenced, it sends 
OffsetFetch without a member ID or epoch



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to