kafka/checkstyle
Bruno Cadonna b3c06b21d9
KAFKA-16017: Checkpoint restored offsets instead of written offsets (#15177)
Kafka Streams checkpoints the wrong offset when a task is closed during
restoration. If under exactly-once processing guarantees a
TaskCorruptedException happens, the affected task is closed dirty, its
state content is wiped out and the task is re-initialized. If during
the following restoration the task is closed cleanly, the task writes
the offsets that it stores in its record collector to the checkpoint
file. Those offsets are the offsets that the task wrote to the changelog
topics. In other words, the task writes the end offsets of its changelog
topics to the checkpoint file. Consequently, when the task is
initialized again on the same Streams client, the checkpoint file is
read and the task assumes it is fully restored although the records
between the last offsets the task restored before closing clean and
the end offset of the changelog topics are missing locally.

The fix is to clear the offsets in the record collector on close.

Cherry-pick of 19727f8

Reviewer: Lucas Brutschy <lbrutschy@confluent.io>
2024-01-12 09:52:20 +01:00
..
.scalafmt.conf MINOR: Update Scalafmt to latest version (#12475) 2022-09-12 10:05:15 -04:00
checkstyle.xml KAFKA-14457; Controller metrics should only expose committed data (#12994) 2022-12-20 10:55:14 -08:00
import-control-core.xml KAFKA-14953: Add tiered storage related metrics (#13944) 2023-07-18 20:16:19 +05:30
import-control-jmh-benchmarks.xml KAFKA-15034: Improve performance of the ReplaceField SMT; add JMH benchmark (#13776) 2023-06-01 15:14:31 -04:00
import-control-metadata.xml KAFKA-15219: KRaft support for DelegationTokens (#14083) 2023-08-19 14:01:08 -04:00
import-control-server-common.xml KAFKA-14595: Move AdminUtils to server-common (#14096) 2023-08-09 10:32:45 +02:00
import-control-storage.xml KAFKA-15399: Enable OffloadAndConsumeFromLeader test (#14285) 2023-08-28 10:34:26 +00:00
import-control.xml KAFKA-16017: Checkpoint restored offsets instead of written offsets (#15177) 2024-01-12 09:52:20 +01:00
java.header MINOR: improve license header check by providing head file instead of (prefix) header regex 2017-02-28 12:35:04 -08:00
suppressions.xml KAFKA-16017: Checkpoint restored offsets instead of written offsets (#15177) 2024-01-12 09:52:20 +01:00