Skip to content

[flink][cdc] Fix schema event position in source reader#8099

Merged
JingsongLi merged 1 commit into
apache:masterfrom
QuakeWang:cdc-schema-skip
Jun 3, 2026
Merged

[flink][cdc] Fix schema event position in source reader#8099
JingsongLi merged 1 commit into
apache:masterfrom
QuakeWang:cdc-schema-skip

Conversation

@QuakeWang
Copy link
Copy Markdown
Contributor

Purpose

CDCSourceSplitReader generated schema change events per split, but re-added them every time a new data batch was attached to the pooled iterator. This could emit duplicate schema events for a multi-batch split.

The same iterator also advanced recordsToSkip for both schema events and data events, while restore only skips underlying data rows. A checkpoint taken after schema events could therefore skip real data rows after recovery.

Tests

  • mvn -pl paimon-flink/paimon-flink-cdc -Dtest=CDCSourceSplitReaderTest test

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
@JingsongLi JingsongLi closed this Jun 3, 2026
@JingsongLi JingsongLi reopened this Jun 3, 2026
@JingsongLi
Copy link
Copy Markdown
Contributor

+1

@JingsongLi JingsongLi merged commit 6e14824 into apache:master Jun 3, 2026
13 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants