Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data duplication may occur when flink checkpoint fails #11008

Closed
2 of 3 tasks
klion26 opened this issue Aug 26, 2024 · 2 comments
Closed
2 of 3 tasks

Data duplication may occur when flink checkpoint fails #11008

klion26 opened this issue Aug 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@klion26
Copy link
Member

klion26 commented Aug 26, 2024

Apache Iceberg version

1.4.3

Query engine

Flink

Please describe the bug 🐞

Currently, the Flink sink connector logic is

  1. The writer receives checkpoint barrier and flush data and sends WriteResult to the committer operator
  2. The committer operator finalizes all WriteResult received from current checkpoint interval
  3. commit to the table when the checkpoint is completed.

if we fail in step 2 before the finalize process[1], then data written in checkpoint i and checkpoint i+1 will squashed into one commit, this will result in the "loss" of some eq-delete data.

for example,
update for primary key A in checkpoint i this will translate to: eq-delete A + insert A,
update for primary key A in checkpoint i + 1, this will translate to eq-delete A + insert A

after the checkpoint i fails, we'll commit to the table with eq-delete A + insert A + eq-delete A + insert A this second eq-delete A will be "lost" when we read from the table.

[1]

dataFilesPerCheckpoint.put(checkpointId, writeToManifest(checkpointId));

Willingness to contribute

  • I can contribute a fix for this bug independently
  • I would be willing to contribute a fix for this bug with guidance from the Iceberg community
  • I cannot contribute a fix for this bug at this time
@klion26 klion26 added the bug Something isn't working label Aug 26, 2024
@pvary
Copy link
Contributor

pvary commented Aug 26, 2024

@klion26: Could you please check #10526? Is this a duplicate of that issue?
Thanks,
Peter

@klion26
Copy link
Member Author

klion26 commented Aug 27, 2024

@pvary thanks for the information, yes, this is a duplicate of #10526 , will close this issue.

@klion26 klion26 closed this as completed Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants