Skip to content

feat(upload): retry the blob commit and roll back when the retries are exhausted - #948

Merged
butonic merged 3 commits into
port-721from
port-746
Nov 4, 2026
Merged

butonic merged 3 commits into
port-721from
port-746

Conversation

@butonic

@butonic butonic commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Part of the upload coordinator stack, see #934.

A failed CommitUpload is now retried with backoff, and the node is rolled back once the retries are exhausted. A rolled back upload is marked failed with the reason and gives its size back only once. As with the decomposedfs sessions before, an upload is finished even if the client goes away, and a failed synchronous commit keeps the staged bytes.

Review focus:

  • asyncconf.go: the retry defaults
  • postprocessing.go: rollback only after the last retry, quota released once
  • coordinator.go: finishing detached from the request context

Review commit by commit: the first commit is the generic change, the following ones adapt the pkg decomposedfs fork and posix.

stacked on #947

Assisted by Claude Code (claude-opus-5-5): it adapted the changes, split them into this stack and wrote this description.

@butonic
butonic added this pull request to stack #950 October 29, 2026 14:05
@butonic butonic added the Type:Maintenance E.g. technical debt, packaging, etc. label Oct 29, 2026
@butonic
butonic removed this pull request from stack #950 October 29, 2026 14:19
@butonic
butonic added this pull request to stack #952 October 29, 2026 14:19
@butonic
butonic force-pushed the port-746 branch 3 times, most recently from 6bb5184 to d2a79be Compare October 30, 2026 10:44
@butonic butonic changed the title port retrying the blob commit in the coordinator feat(upload): retry the blob commit and roll back when the retries are exhausted Nov 3, 2026
@butonic
butonic force-pushed the port-746 branch 4 times, most recently from a34c1d6 to cba8c96 Compare November 4, 2026 07:56
LarsJurgensen and others added 3 commits November 4, 2026 10:27
… retries are exhausted

This also adds the reva_upload_sessions_commit_failed counter the
retry reports, which came with the driver-side retry that the
coordinator replaces.
…once

When the coordinator rolls back a node but keeps the upload (an abort,
a commit that failed after all retries, a cleanup that keeps the
bytes), the session is now marked failed with the reason and its size
diff is cleared. Listing uploads shows why the upload stopped, and a
later cleanup of the kept session cannot release the quota a second
time, which matters for an orphaned node whose rollback works from the
session alone.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
… commit fails

The decomposedfs upload sessions finished an upload without the
request's cancellation, so a client going away could not leave it half
done, and kept the staged bytes when a synchronous commit failed, as
they are the only copy of the upload. Restore both in the coordinator:
a failed synchronous commit now rolls back the node but keeps the
session, marked failed, like a failed asynchronous one. Log why tusd
could not finish an upload, as the sessions did.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
@butonic
butonic merged commit 1168881 into workpackages Nov 4, 2026
19 checks passed
@butonic
butonic deleted the port-746 branch November 4, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type:Maintenance E.g. technical debt, packaging, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants