Skip to content

fix: skip object store check when UseRESTCatalogCommit is enabled#328

Open
liujiayi771 wants to merge 3 commits into
alibaba:mainfrom
liujiayi771:fix/skip-object-store-check-for-rest-commit
Open

fix: skip object store check when UseRESTCatalogCommit is enabled#328
liujiayi771 wants to merge 3 commits into
alibaba:mainfrom
liujiayi771:fix/skip-object-store-check-for-rest-commit

Conversation

@liujiayi771
Copy link
Copy Markdown

@liujiayi771 liujiayi771 commented Jun 2, 2026

Purpose

When UseRESTCatalogCommit(true) is set, FileStoreCommit delegates the final snapshot commit to the REST catalog server instead of writing the snapshot file to the filesystem. The existing object store restriction (which blocks commit on oss://, s3://, etc.) exists because atomic rename is not supported on object stores — but this restriction does not apply in REST commit mode since no snapshot file needs to be atomically written by the client.

Currently, external catalog integrations that use UseRESTCatalogCommit(true) with object store table paths are forced to set the internal test flag enable-object-store-commit-in-inte-test to bypass this check. This PR relaxes the constraint so that UseRESTCatalogCommit(true) alone is sufficient.

Changes

  • file_store_commit.cpp: Added !ctx->UseRESTCatalogCommit() to the object store check condition, so REST commit mode skips the restriction.

Tests

  • TestObjectStoreBlockedWithoutRESTCommit: Verifies that non-REST commit mode still correctly identifies object store vs. local paths via FileSystem::IsObjectStore().
  • TestRESTCatalogCommitWithObjectStorePath: Verifies that REST commit mode works end-to-end (Create → Commit → GetLastCommitTableRequest) and does not write snapshot files to the filesystem.

All 30 existing FileStoreCommitImplTest tests continue to pass.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jun 2, 2026

CLA assistant check
All committers have signed the CLA.

@liujiayi771 liujiayi771 marked this pull request as draft June 2, 2026 01:58
@liujiayi771 liujiayi771 force-pushed the fix/skip-object-store-check-for-rest-commit branch from 0ece315 to 2f5ec3b Compare June 2, 2026 02:00
@liujiayi771 liujiayi771 marked this pull request as ready for review June 2, 2026 02:57
When UseRESTCatalogCommit(true) is set, FileStoreCommit does not write
snapshot files to the filesystem — it delegates the final commit to the
REST catalog server. The object store restriction (which exists because
atomic rename is not supported on object stores) does not apply in this
mode since no snapshot file needs to be atomically written.

This allows external catalog integrations (e.g., DLF) to use
FileStoreCommit with oss:// table paths without needing the
"enable-object-store-commit-in-inte-test" workaround flag.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@liujiayi771 liujiayi771 force-pushed the fix/skip-object-store-check-for-rest-commit branch from 2f5ec3b to d9791b1 Compare June 2, 2026 05:45
Copy link
Copy Markdown
Collaborator

@lxy-9602 lxy-9602 left a comment

Choose a reason for hiding this comment

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

+1

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.

3 participants