Skip to content

[rest] Remove renameBranch REST endpoint#8023

Open
qingwei727 wants to merge 1 commit into
apache:masterfrom
qingwei727:remove-rest-rename-branch
Open

[rest] Remove renameBranch REST endpoint#8023
qingwei727 wants to merge 1 commit into
apache:masterfrom
qingwei727:remove-rest-rename-branch

Conversation

@qingwei727
Copy link
Copy Markdown
Contributor

@qingwei727 qingwei727 commented May 28, 2026

Purpose

The server-side implementation of renameBranch ultimately relies on the
underlying object store's rename (e.g. OSS), which is not atomic. While
the rename is in progress, concurrent writes to the source branch can be
silently lost, and there is currently no reliable way for the server to
fence those writes during the operation.

Because of this consistency risk, we'd rather not offer renameBranch over
the REST catalog at all than offer it with a known data-loss window. This
PR retires only the REST surface — the Catalog interface and the non-REST
implementations (file-system branch manager, Spark/Flink procedures, etc.)
are intentionally left untouched, so users on those code paths are not
affected.

Tests

RESTCatalogTest#testBranches

Strip the client-side renameBranch call, its request path, and the
RenameBranchRequest payload. RESTCatalog now throws
UnsupportedOperationException for renameBranch to satisfy the Catalog
interface. Mock server and tests updated accordingly.
@qingwei727 qingwei727 force-pushed the remove-rest-rename-branch branch from 2e1a09c to 3691ea1 Compare May 28, 2026 13:26
@sundapeng
Copy link
Copy Markdown
Member

sundapeng commented May 28, 2026 via email

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