TaiJuWu created KAFKA-21439:
-------------------------------

             Summary: Share group skips records written after an unclean leader 
election when their offsets were already acknowledged
                 Key: KAFKA-21439
                 URL: https://issues.apache.org/jira/browse/KAFKA-21439
             Project: Kafka
          Issue Type: Bug
            Reporter: TaiJuWu
            Assignee: TaiJuWu


After an unclean leader election, records written to the new leader can reuse 
offsets the share group already acknowledged. The share group never delivers 
them. A classic consumer group detects the truncation (KIP-320) and reads them.

*Steps*

# Topic with replicas [1, 2] and `unclean.leader.election.enable=true`. Shut 
down broker 2.
# Produce 50 records. Two share consumers acknowledge them (SPSO = 50).
# Shut down broker 1, start broker 2, and run an unclean election. Broker 2 
becomes the leader with an empty log.
# Produce 70 new records (offsets 0-69).

*Expected:* the share group receives all 70 records.
*Actual:* it receives only offsets 50-69. While the log end offset is below 50, 
the broker logs this ERROR on every fetch:
reproduce PR
https://github.com/apache/kafka/pull/24131



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

Reply via email to