fix: [OCISDEV-1392][stable-8.0] release quota of orphaned upload sessions - #730
Merged
Merged
Conversation
When an upload's target node lost its metadata, e.g. because an ancestor was trashed while the upload was in flight, the node file remained without a readable .mpk. Reading it fails with "Missing parent ID on node", so the upload never finished postprocessing: it stayed in "Processing", could not be downloaded or deleted, and kept consuming the quota. Cleanup made this worse. It removed the upload bytes and the session info file before attempting to revert the node, then bailed out on the failing node read without releasing the quota - destroying both the only copy of the data and the parent id needed to repair the node, while freeing nothing. Revert the node before anything irreversible and fall back to the parent id recorded in the session when the node cannot be read, so the quota is released and the orphaned node removed. Keep the upload if the quota cannot be released. Also clean up such sessions when postprocessing finishes instead of returning early and leaving them to be retried forever. Add an Orphaned upload session filter to list affected sessions. It is only evaluated when set, as it reads the node metadata of every session. Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
f-firas
approved these changes
Sep 10, 2026
LarsJurgensen
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backports: #692