Skip to content

[OCISDEV-822] preserve upload bin on Finalize failure#578

Merged
kobergj merged 1 commit intostable-8.0from
fix/OCISDEV-822-preserve-upload-bin-on-finalize-failure-stable-8.0
Apr 23, 2026
Merged

[OCISDEV-822] preserve upload bin on Finalize failure#578
kobergj merged 1 commit intostable-8.0from
fix/OCISDEV-822-preserve-upload-bin-on-finalize-failure-stable-8.0

Conversation

@kobergj
Copy link
Copy Markdown
Collaborator

@kobergj kobergj commented Apr 23, 2026

Backport of #577 to stable-8.0.

Summary

  • When Finalize fails during synchronous upload finalization, Cleanup was called with cleanBin=true unconditionally, permanently deleting the bin file from uploads/ even though the blob never reached blobs/
  • This made blobs unrecoverable — including via move-stuck-upload-blobs — causing e.g. missing received.json blobs in the jsoncs3 share manager metadata space
  • Fix: pass err == nil as cleanBin so the bin is only removed on success

Test plan

  • Trigger a WriteBlob failure during synchronous finalization (e.g. cross-device rename on NFS); confirm bin file is preserved in uploads/
  • Confirm successful uploads still clean up the bin file normally
  • Run move-stuck-upload-blobs after a failed finalization; confirm the bin is now recoverable

🤖 Generated with Claude Code

When WriteBlob fails during synchronous finalization, Cleanup was called
with cleanBin=true unconditionally, permanently deleting the bin file
from uploads/ even though the blob never reached blobs/. This makes the
blob unrecoverable, even via move-stuck-upload-blobs.

Fix: only clean the bin file when Finalize succeeds (err == nil).
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
@kobergj kobergj changed the title fix(decomposedfs): preserve upload bin on Finalize failure [OCISDEV-822] preserve upload bin on Finalize failure Apr 23, 2026
@kobergj kobergj merged commit 3f2e775 into stable-8.0 Apr 23, 2026
@kobergj kobergj deleted the fix/OCISDEV-822-preserve-upload-bin-on-finalize-failure-stable-8.0 branch April 23, 2026 12:03
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