Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.6.0
Description
In 3.6, the local log start offset is not updated when reconstructing the auxiliary state of the remote log on a follower.
The impact of this bug is significant because, if this follower becomes the leader before the local log start offset has had a chance to be updated, reads from any offset between [wrong log start offset; actual log start offset] will be routed on the local storage, which does not contain the corresponding data. Consumer reads will in this case never be satisfied.
Reproduction case 1:
- Create cluster with 2 brokers, broker 0 and broker 1.
- Create a topic topicA with RF=1, 1 partition (topicA-0) on broker 0, and 1 batch per segment.
- Produce 3 records to topicA, such that segment 1 and segment 2 with the first two records are copied to remote and deleted from local storage.
- Reassign replica to add broker 1 to the replica set for topicA-0, and elect broker 1 as the leader.
- Try to consume from the beginning of topicA-0.
Reproduction case 2:
- Create a cluster with 2 brokers, broker 0 and broker 1.
- Create a topic topicA with RF=2, 1 partition (topicA-0) and 2 batches per segment, with broker 0 as the leader.
- Stop broker 1, and produce 3 records to topicA, such that segment 1 with the first two records are copied to remote and deleted from local storage.
- Start broker 1, let it catch up with broker 0.
- Stop broker 0 such that broker 1 is elected as the leader, and try to consume from the beginning of topicA-0.
Consumer read will not be satisfied in these cases because the local log start offset is not updated on broker 1 when it builds the auxiliary state of the remote log segments.
Attachments
Issue Links
- is a child of
-
KAFKA-15420 Kafka Tiered Storage V1
- Resolved
- links to