Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-16092 Queues for Kafka
  3. KAFKA-18164

Empty in memory acknowledgements when a shareAcknowledge request fails

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0
    • 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

          Activity

            People

              shivsundar Shivsundar R
              cwadhwa Chirag Wadhwa
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: