Skip to content

fix(decomposedfs): [OCISDEV-817] remove stale trash symlink on partial delete rollback - #723

Merged
LarsJurgensen merged 1 commit into
mainfrom
fix/OCISDEV-817-remove-stale-trash-symlink-on-delete-failure
Aug 27, 2026
Merged

fix(decomposedfs): [OCISDEV-817] remove stale trash symlink on partial delete rollback#723
LarsJurgensen merged 1 commit into
mainfrom
fix/OCISDEV-817-remove-stale-trash-symlink-on-delete-failure

Conversation

@LarsJurgensen

Copy link
Copy Markdown

Description

In Tree.Delete, a trash symlink is created before the node is renamed.
If any subsequent step failed, the symlink was left behind. The dangling
symlink permanently blocked future delete attempts on the same node with
a file exists error on the next os.Symlink call.

All three failure paths now remove the trash symlink as part of rollback.
The third path (parent-dir entry removal) additionally reverts the node
rename and metadata rename in reverse order.

Related Issue

  • Fixes OCISDEV-817

Motivation and Context

A metadata backend failure mid-delete left a stale symlink in the trash
directory. The node appeared intact but could never be deleted again.

@kw-security

kw-security commented Aug 26, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@LarsJurgensen
LarsJurgensen marked this pull request as ready for review August 26, 2026 11:22
@LarsJurgensen
LarsJurgensen requested a review from a team as a code owner August 26, 2026 11:22
@LarsJurgensen
LarsJurgensen merged commit 0b92c89 into main Aug 27, 2026
16 checks passed
@LarsJurgensen
LarsJurgensen deleted the fix/OCISDEV-817-remove-stale-trash-symlink-on-delete-failure branch August 27, 2026 07:53
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