Shivsundar R created KAFKA-19485:
------------------------------------
Summary: Acknowledgements should not be sent on initial epoch of
ShareFetch
Key: KAFKA-19485
URL: https://issues.apache.org/jira/browse/KAFKA-19485
Project: Kafka
Issue Type: Sub-task
Reporter: Shivsundar R
There are some race scenarios in multi-broker environments where
acknowledgements are sent on an initial epoch in a ShareSession.
This could arise if
# Consumer subscribed to a partition whose leader was node-0.
# Broker restart happens and node-0 is elected leader again. Broker starts a
new ShareSession.
# Background thread sends a fetch request with non-zero epoch.
# Broker responds with SHARE_SESSION_NOT_FOUND.
# Client updates session epoch to 0 once it receives this error.
# Application thread processing the previous fetch, completes and sends acks
to piggyback on next fetch.
# Next fetch will send the piggyback acknowledgements on the fetch resulting
in error from broker ("Acknowledgments sent on initial epoch").
*Fix :* Add a check before sending out acknowledgments if we are on an initial
epoch.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)