Skip to content

Allow FileStoreCommit for PK tables with postpone bucket mode#337

Open
liujiayi771 wants to merge 1 commit into
alibaba:mainfrom
liujiayi771:fix/allow-postpone-bucket-commit
Open

Allow FileStoreCommit for PK tables with postpone bucket mode#337
liujiayi771 wants to merge 1 commit into
alibaba:mainfrom
liujiayi771:fix/allow-postpone-bucket-commit

Conversation

@liujiayi771
Copy link
Copy Markdown

@liujiayi771 liujiayi771 commented Jun 3, 2026

Summary

  • Allow FileStoreCommit::Create to proceed for PK tables when using postpone bucket mode (bucket=-2)
  • In postpone bucket mode, all records are first stored in the bucket-postpone directory of each partition and are not available to readers. To move the records into the correct bucket and make them readable, a compaction job needs to be run (via compact procedure or triggered by the catalog server)
  • The commit logic (manifest and snapshot generation) is identical to append tables, so there is no reason to block it
  • PK tables with fixed bucket (bucket > 0) remain blocked as before

Test plan

  • TestPostponeBucketPKTableCommitAllowed: PK table with bucket=-2FileStoreCommit::Create succeeds without workaround flag
  • TestFixedBucketPKTableCommitRejected: PK table with bucket=4FileStoreCommit::Create returns NotImplemented

Reference

Postpone bucket mode (bucket=-2) writes data like an append table:
all files go to bucket--2/ directory and the REST catalog server
handles bucket redistribution during background compaction. The
commit logic (manifest and snapshot generation) is identical to
append tables, so there is no reason to block it.

See: https://paimon.apache.org/docs/master/primary-key-table/data-distribution/#postpone-bucket

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant