Skip to content

[core] Cover snapshot sequence bucket rescale check#8286

Merged
JingsongLi merged 1 commit into
apache:masterfrom
Aitozi:mwj/cherry-pick-af1db1d
Jun 19, 2026
Merged

[core] Cover snapshot sequence bucket rescale check#8286
JingsongLi merged 1 commit into
apache:masterfrom
Aitozi:mwj/cherry-pick-af1db1d

Conversation

@Aitozi

@Aitozi Aitozi commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Purpose

This PR makes write-only snapshot sequence APPEND commits participate in the same bucket-number consistency check as unordered write-only append commits. It prevents INSERT INTO from writing new files with a rescaled bucket count before existing data layout is rewritten, while INSERT OVERWRITE can still be used to rescale the layout.

Tests

  • git diff --check HEAD^ HEAD
  • mvn -s ~/.m2/apache-community.xml -pl paimon-core -am -Pfast-build -DfailIfNoTests=false -Dtest=FileStoreCommitTest#testWriteOnlySnapshotSequenceCommitChecksRescaledBucketNumber test

@JingsongLi

Copy link
Copy Markdown
Contributor

Reviewed the change and the added coverage. The widened same-bucket check is scoped to APPEND commits on fixed hash buckets and now also covers write-only snapshot sequence initialization, which is the path that can otherwise skip restoring previous file metadata during writes. OVERWRITE still bypasses the check, so the supported bucket-rescale flow remains available.

I also ran the focused core regression test locally:

mvn -pl paimon-core -Pfast-build -Dtest=FileStoreCommitTest#testWriteOnlySnapshotSequenceCommitChecksRescaledBucketNumber test

LGTM from my side.

@JingsongLi JingsongLi merged commit 926459d into apache:master Jun 19, 2026
12 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