You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pkg/storage: release quota of orphaned upload sessions (#692) (#730)
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>
Co-authored-by: kobergj <juliankoberg@googlemail.com>
0 commit comments