Skip to content

fix: [OCISDEV-1392][stable-8.0] release quota of orphaned upload sessions - #730

Merged
mklos-kw merged 1 commit into
stable-8.0from
backport/8.0/orphaned-upload-sessions
Sep 10, 2026
Merged

fix: [OCISDEV-1392][stable-8.0] release quota of orphaned upload sessions#730
mklos-kw merged 1 commit into
stable-8.0from
backport/8.0/orphaned-upload-sessions

Conversation

@mklos-kw

@mklos-kw mklos-kw commented Sep 9, 2026

Copy link
Copy Markdown
Member

backports: #692

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>
@kw-security

kw-security commented Sep 9, 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.

@mklos-kw mklos-kw changed the title fix: [stable-8.0] release quota of orphaned upload sessions fix: [OCISDEV-1392][stable-8.0] release quota of orphaned upload sessions Sep 10, 2026
@mklos-kw
mklos-kw merged commit 40663c5 into stable-8.0 Sep 10, 2026
23 of 25 checks passed
@mklos-kw
mklos-kw deleted the backport/8.0/orphaned-upload-sessions branch September 10, 2026 09:32
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.

5 participants