[Bug] Drop branch DDL reports success when the branch directory cannot be deleted
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/paimon
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
REST Catalog alterTable silently reports success when the server returns a non-table/column 404Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
P2 testing
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
area/core kind/bug status/triage team/core-shared
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
checkstyle/checkstyle#21755 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
spring-projects/spring-integration#11495 ·
Maintainers usually reply within 2 days
-
Issue: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
OpenAPITools/openapi-generator#25021 ·
Maintainers usually reply within 1 day