Skip to content

KAFKA-20940: Windowed changelog restore optimization is skipped whenever a checkpointed offset exists - #23285

Open
alanlau28 wants to merge 3 commits into
apache:trunkfrom
alanlau28:KAFKA-20940-checkpointed-windowed-restore
Open

KAFKA-20940: Windowed changelog restore optimization is skipped whenever a checkpointed offset exists#23285
alanlau28 wants to merge 3 commits into
apache:trunkfrom
alanlau28:KAFKA-20940-checkpointed-windowed-restore

Conversation

@alanlau28

@alanlau28 alanlau28 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Jira: https://issues.apache.org/jira/browse/KAFKA-20940

The windowed changelog restore optimization added in KAFKA-13499, which
seeks past already-expired records instead of restoring them, only ran
for partitions with no checkpointed offset; whenever a checkpoint
existed the reader sought straight to it and restored every record after
it, replaying a prefix of data that retention had already expired. This
extends the optimization to checkpointed active windowed changelogs
whose checkpoint is far enough behind the end offset to be worth it,
running them through the same probe but floored at the checkpoint so
restoration never rewinds past records that have already been applied.
When the probe cannot place a partition, or the checkpoint sits below
the log start or the log is empty, restore falls back to the checkpoint
rather than the beginning and leaves the existing truncation and
corruption handling unchanged.

@github-actions github-actions Bot added triage PRs from the community streams labels Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved streams triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants