Repository navigation
feat(storageprovider): hand uploads to the upload coordinator - #947
Merged
Merged
Conversation
butonic
force-pushed
the
port-721
branch
3 times, most recently
from
October 30, 2026 10:44
5e56fa5 to
b7f20af
Compare
dragonchaser
approved these changes
Nov 2, 2026
butonic
force-pushed
the
port-721
branch
4 times, most recently
from
November 4, 2026 07:56
56dfc8b to
a7647bd
Compare
…the driver
Decomposedfs keeps consuming only the DeleteRevision event, in a
consumer group of its own ("dcfs-revisions"), since the coordinator
takes the "dcfs" group. The tus handler still resolves a finished
upload through the driver for the etag and permission headers.
…g fork The pkg fork no longer consumes postprocessing events. Like the legacy copy it only keeps a DeleteRevision consumer in the "dcfs-revisions" group, since the coordinator takes the "dcfs" group. - the coordinator resolves a finished tus upload for the etag and permission headers, so this keeps working once the drivers drop their session stores - the coordinator passes the staged file's path to CommitUpload, so posix can move it into place instead of copying it - pkg/upload uses go-viper/mapstructure like the rest of the repo The async upload specs of the pkg fork now drive uploads through the coordinator against the real driver. When the newer of two overlapping uploads is rolled back, the file is handed back to the older one, and when both fail, the file the older one created is removed and its quota released. For that, rolling back an upload that created the file while a newer one is processing marks the revision the newer upload kept, so its rollback purges the file; a commit removes such revisions. With versioning disabled, a live commit also removes the snapshots an overlapping upload kept for a rollback, but keeps the versions created before versioning was disabled. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
The header was left out for new files, because their id used to be decided by the commit. A driver whose PrepareUpload creates the node does so under the id minted at initiate, so that id is the file's, and COPY, which reads the id from the upload response, needs it. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
… mock The coordinator reads the node it touched back without metadata keys, so the request carries "mdKeys":null. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
The coordinator stages uploads in an upload directory, which the ocmreceived driver cannot derive, and commits them as the service account, so the cesnet storage and data providers share an upload directory and get a service account. UploadGateway announces the upload length like ocdav does: without it the coordinator takes the upload as empty and finishes it at initiate. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
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.
Part of the upload coordinator stack, see #934.
This is the switch: the storageprovider and dataprovider now hand uploads to the coordinator instead of the driver. The drivers only keep a
DeleteRevisionconsumer, in the "dcfs-revisions" group. The coordinator takes the "dcfs" group.Also:
Oc-Fileidfor a new file the driver created at prepare (COPY needs it)Upload-Length)Review focus:
storageprovider.go/dataprovider.go: how the coordinator is configured and that every upload path goes through itDeleteRevisionconsumer must not steal each other's eventsdatatx/manager/tus/tus.goReview commit by commit: the first commit is the generic change, the following ones adapt the pkg decomposedfs fork and posix.
stacked on #946
Assisted by Claude Code (claude-opus-5-5): it adapted the changes, split them into this stack and wrote this description.