Skip to content

Conversation

@aiborodin
Copy link
Contributor

@aiborodin aiborodin commented Nov 6, 2025

This PR addresses the issue in #14425 by validating that no concurrent commit has moved the flink.max-committed-checkpoint-id in DynamicIcebergSink that would not be seen by the committer due to the table refreshing during the commit process.

Change-Id: Id5fb471eb4234168093fbbe5e7ccf3607794ddc9
@aiborodin aiborodin force-pushed the fix-commit-duplication-in-flink branch from 36f03a9 to 90877bf Compare November 7, 2025 04:01
@github-actions github-actions bot removed the API label Nov 7, 2025
@aiborodin
Copy link
Contributor Author

@pvary, I updated this PR with the new API that was recently merged.

lastCommittedCheckpointId = Long.parseLong(value);
break;
}
@Nullable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this annotation doesn't add much info, since we immediately check the null value after the line.
Please remove it.

}

@Nullable
private static Long extractCommittedCheckpointId(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we change the getMaxCommittedCheckpointId to use Iterable<Snapshot> baseSnapshots instead of the table parameter? In this case we can reuse the same method, and we don't need to write some spagetti code.

And in the original place we could just add

        table.snapshot(branch) != null
            ? SnapshotUtil.ancestorsOf(table.snapshot(branch).snapshotId(), table::snapshot)
            : List.of();

public String errorMessage() {
if (errorMessage == null) {
return SnapshotAncestryValidator.super.errorMessage();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: newlines after blocks. See: https://iceberg.apache.org/contribute/#block-spacing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants