Skip to content

Conversation

@Maxbey
Copy link

@Maxbey Maxbey commented Jan 5, 2026

What changed and why?
We encountered an issue when files became permanently stuck and could not be deleted. This happens when a process crashes (or is killed) between the mknod and open FUSE calls.

The file is created in LocalUnopened state, but since the process never opens it for writing, there's no way to complete or cancel the write, and unlink becomes blocked if we try to delete the stale file.

Previously, unlinking any local file (LocalUnopened, LocalOpen, or PendingRename) was blocked with unlink on local file not allowed until write is complete. However, files in LocalUnopened state have never been opened for writing, so no S3 upload has started. These files exist only in the local inode tree and can be removed without S3 cleanup.

This change separates the handling of LocalUnopened from LocalOpen/PendingRename, allowing unlink to succeed for files that were created but never opened.

Does this change impact existing behavior?

Yes. Previously, attempting to unlink a LocalUnopened file returned an error. Now it succeeds.

Does this change need a changelog entry? Does it require a version change?

Yes.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

@Maxbey Maxbey requested a deployment to PR integration tests January 5, 2026 03:21 — with GitHub Actions Waiting
@Maxbey Maxbey force-pushed the bugfix/unlink-local-unopened branch from 921fd3e to 8d795db Compare January 5, 2026 07:54
@Maxbey Maxbey requested a deployment to PR integration tests January 5, 2026 07:54 — with GitHub Actions Waiting
@Maxbey Maxbey force-pushed the bugfix/unlink-local-unopened branch from 8d795db to 3793c38 Compare January 5, 2026 07:55
@Maxbey Maxbey requested a deployment to PR integration tests January 5, 2026 07:55 — with GitHub Actions Waiting
@Maxbey Maxbey force-pushed the bugfix/unlink-local-unopened branch from 3793c38 to 2ce82d2 Compare January 5, 2026 08:24
@Maxbey Maxbey requested a deployment to PR integration tests January 5, 2026 08:25 — with GitHub Actions Waiting
@Maxbey Maxbey force-pushed the bugfix/unlink-local-unopened branch from 2ce82d2 to 38fa041 Compare January 5, 2026 08:55
@Maxbey Maxbey requested a deployment to PR integration tests January 5, 2026 08:55 — with GitHub Actions Waiting
@Maxbey Maxbey force-pushed the bugfix/unlink-local-unopened branch from 38fa041 to 2cb1091 Compare January 5, 2026 09:01
@Maxbey Maxbey requested a deployment to PR integration tests January 5, 2026 09:01 — with GitHub Actions Waiting
Files created but never opened (LocalUnopened) have no S3 state and can
be unlinked. This prevents files from getting stuck in a state
where they cannot be deleted.

Signed-off-by: Maksim Beiner <[email protected]>
@Maxbey Maxbey force-pushed the bugfix/unlink-local-unopened branch from 2cb1091 to d907a7e Compare January 6, 2026 08:03
@Maxbey Maxbey temporarily deployed to PR integration tests January 6, 2026 08:03 — with GitHub Actions Inactive
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.

1 participant