Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug] Drop branch DDL reports success when the branch directory cannot be deleted

Open Beginner friendly
#10,237 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java, spark
Domain
databases

Research direction

Locate FileSystemBranchManager.dropBranch and inspect how fileIO.delete(branchPath, true) handles IOException. Compare its behavior with createBranch, renameBranch, fastForward, and CatalogBranchManager.dropBranch, then find the relevant branch or DDL tests. Done means a failed branch-directory deletion reaches the caller and the DROP BRANCH DDL no longer reports success.

Written by the indexing model from the issue text.

Description

Search before asking
  • I searched in the issues and found nothing similar.
Paimon version

master

Compute Engine

JavaAPI / Flink / Spark (DDL)

Minimal reproduce step

FileSystemBranchManager.dropBranch catches the IOException thrown by fileIO.delete(branchPath, true), logs it at INFO level, and returns normally. Because the method returns void and throws nothing, the drop-branch DDL reports success even though the branch directory and all of its data are still on the filesystem.

Run ALTER TABLE t DROP BRANCH b (filesystem catalog) where the branch directory delete fails, for example due to a permission or filesystem error.

What doesn't meet your expectations?

The DDL succeeds, so the user believes the branch is gone, but its directory and data remain and storage is not reclaimed. A later CREATE BRANCH b with the same name then fails with "Branch name 'b' already exists", which is hard to explain to someone who was told the drop succeeded. The INFO message even says "Please try again", yet no error reaches the caller to prompt a retry.

When the branch directory cannot be deleted, the DDL should fail so the caller knows the branch was not dropped. This also matches createBranch, renameBranch, and fastForward in the same class, and the catalog-backed CatalogBranchManager.dropBranch, which all propagate the failure.

Anything else?

No response

Are you willing to submit a PR?
  • I'm willing to submit a PR!
Dominant language
Java
Stars
3.4k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
502

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/paimon

All issues in apache/paimon

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.