Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
When there are 2 share acknowledge requests to be sent to acknowledge all the records fetched by the latest fetch and the first request was unsuccessful because of broker shutdown, this sends back an error response to the ShareConsumeRequestManager with a DisconnectException. This results in closing of the shareSession on the client side. So, the next request that will be build would have a shareSessionEpoch as 0. While this was going on, the next shareAcknowledge request was in the process of building with the remaining acknowledgements. But, this request cannot be successfully built, because the shareSessionEpoch cannot be 0 for a shareAcknowledge request. Thus sessionHandler.newShareAcknowledgeBuilder(groupId, fetchConfig) returns a null in the buildRequest method inside ShareConsumeRequestManager. Also, since the in memory map of acknowledgements to send is never emptied, the subsequent polls of ShareConsumeRequestManager always tries to build a shareAcknowledgerRequest.
Fix - empty the in memory map of acknowledgements in the case where the request could not be built, because we do not want to send the acknowledgements again.
Attachments
Issue Links
- fixes
-
KAFKA-18165 Update nodesWithPendingRequests only when a request successfully builds
- Resolved
- links to