Repository navigation
chore: merge main into workpackages - #1001
Merged
Merged
Conversation
Synchronous uploads no longer mark the node as processing, so an interrupted upload can't leave the file stuck answering 425. See opencloud-eu/opencloud#3240.
Reading such a node now finishes the interrupted upload instead of failing with 425 forever. See opencloud-eu/opencloud#3240.
Writing the node can report an error after it happened, e.g. when the cache push fails. Sessions finished right away are no longer saved either, so that can't fail the upload after the switch.
Removing it first left a window where the node pointed to the lost blob without the marker that recovery looks for.
Only the tree time, so clients notice the change. The size difference might have been counted already, e.g. by an upload that started while the store was async.
Only set MaxAge on main-queue when it has none, and keep the rest of the existing config. The old full-config update reset replicas to 1. Fixes opencloud-eu/opencloud#3869
Setting a new space image left the previous image file in the space, so every image change wasted storage. We now remember the old image id and delete it after the new one was successfully set. A failed delete is ignored, the update itself already succeeded. backport of owncloud#480 Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
CreateDir, TouchFile, RestoreRevision, RestoreRecycleItem, SetLock and Unlock now return a typed result with the space owner instead of pushing it through a channel registered in the context. The events middleware registers a slot, the storageprovider writes the owner from the result into it, and the middleware reads it after the handler returned. That replaces the goroutine + channel dance, which could drop the owner when the select ran before the goroutine sent it. The move result slot follows the same pattern now and the middleware no longer builds an ItemMoved event without a move result. Our trashbin interface differs from upstream (it is space id based and returns the restored node), so Decomposedfs.RestoreRecycleItem builds the result from the restored node instead of the trashbin returning it. The cephfs, s3 and cbox eoswrapper drivers do not exist here. backport of owncloud#615 Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
FS.Delete now returns a DeleteResult with the space owner and the id of the deleted node. The storageprovider puts it into a context slot and the events middleware builds ItemTrashed from it, so the event carries the id of the trashed node even when the request referenced it by parent id and relative path. We keep our stat before deleting: it rejects deleting files that are still processing and puts the node id into the response opaque. For drivers that do not return a result ItemTrashed falls back to that opaque id before using the id from the request. backport of owncloud#617 Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
DeleteStorageSpace now returns a DeleteStorageSpaceResult. When purging, decomposedfs captures the space name and the active members before it deletes anything, and the events middleware builds SpaceDeleted from that instead of the response opaque. Disabling returns an empty result. Differences to upstream: - the storageprovider still lists the space first, so non-members keep getting a not found, and it still fills the response opaque. Drivers without a result fall back to that opaque for SpaceDeleted. - decomposedfs does not emit SpaceMembershipExpired while collecting the final members. In our tree the share manager emits that event, and the purge removes expired grants together with the space anyway. Expired grants are just left out. - a failure to list the grants now aborts the purge instead of only being logged, we need them for the event. backport of owncloud#622 Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
The typed results added a second alias for the same package, which staticcheck flags as ST1019. Use userpb everywhere. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
* 🎉 Release 2.52.2 * 🎉 Release 2.52.2 * 🎉 Release 2.52.2 * 🎉 Release 2.52.2 * 🎉 Release 2.52.2 * 🎉 Release 2.52.2 * 🎉 Release 2.52.2 * 🎉 Release 2.52.2 * 🎉 Release 2.52.2 * 🎉 Release 2.52.2 * 🎉 Release 2.52.2 * 🎉 Release 2.52.2 * 🎉 Release 2.52.2 * 🎉 Release 2.52.2 * 🎉 Release 2.52.2 * 🎉 Release 2.52.2 * 🎉 Release 2.52.2 * 🎉 Release 2.52.2 * 🎉 Release 2.52.2
storage: return typed results from write operations
Fix files stuck in processing after an interrupted synchronous upload
Don't reset main-queue settings on startup
Fail fast when the posix id cache is not nats-js-kv
Brings the typed storage results (#986), the stuck synchronous upload fix (#976), the main-queue replica fix (#984), the posix id cache fail fast (#989) and release 2.52.2 into workpackages. The typed results were mostly mechanical: the ocm received driver keeps its service account client, nextcloud keeps its real TouchFile (now returning a TouchFileResult), and the coordinator ignores the TouchFile result and still reads the node back, because not every driver fills it. #976 patched the legacy upload session store, which workpackages removed. Its recovery of nodes left processing by an interrupted synchronous upload moves into the pkg fork as Decomposedfs.recoverInterruptedUpload. The coordinator stages sessions in the same <upload dir>/<id> and <id>.info layout as the old store, so nodes stuck by older versions still heal on the first download. Aspects.DisableVersioning stays gone, SeparateBlobs comes along. The sync specs now drive uploads through the coordinator. The two blob-first specs follow with the next commit, which moves the blob-first write to the coordinator path. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
The coordinator finished inline uploads in three steps: PrepareUpload pointed the node to the session's blob and marked it as processing, CommitUpload stored the blob, and MarkProcessing removed the mark. A crash in between left the mark forever, since nothing postprocesses synchronous uploads, and downloads failed with 425. This is the coordinator side of the bug #976 fixed in the legacy upload path on main. We now hand PrepareUpload the staged file (UploadInfo.Source) on the inline path. With a blobstore that keeps blobs apart from the nodes (decomposed, decomposeds3), PrepareUpload stores the blob and only then switches the node, without a mark. For an existing file that happens under the node lock, after the etag and quota checks. For a new file the blob is stored before the node exists, like main does: a crash while writing must not leave a node without metadata that blocks the name. PrepareUpload reports Committed, so the coordinator skips CommitUpload and MarkProcessing. Posix and the other drivers ignore Source and keep the old flow. A mark left by an interrupted upload is cleared in the same write, by emptying it. Only a processing mark counts as an upload superseding the node now, an empty one would make every later upload take a snapshot. The revisions kept only for a rollback go away like after a live commit, but not before the size was propagated: until then the rollback still needs them and their blobs. If the blob cannot be stored, PrepareUpload wraps storage.ErrSourceNotStored and the coordinator keeps the session as failed, like after a failed CommitUpload: the staged bytes are the only copy of the upload and the failure may be transient. If writing the node fails, PrepareUpload puts the old metadata back. The new blob is still kept, because the failed write might have switched the node anyway, so the spec from main now expects the old content plus a leftover blob. Assisted-by: Claude Code:claude-fable-5-2 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
This was referenced Nov 13, 2026
dragonchaser
approved these changes
Nov 13, 2026
butonic
added a commit
to opencloud-eu/opencloud
that referenced
this pull request
Nov 13, 2026
Brings in opencloud-eu/reva#1001, which merges reva main into workpackages: the typed storage results, the fix for synchronous uploads stuck in processing (moved to the upload coordinator), the main-queue replica fix and the posix id cache fail fast. 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.
Brings main into workpackages: the typed storage results (#986), the fix for synchronous uploads stuck in processing (#976), the main-queue replica fix (#984), the posix id cache fail fast (#989) and release 2.52.2.
The typed results were mostly mechanical. The ocm received driver keeps its service account client, nextcloud keeps its real
TouchFile, and the coordinator ignores theTouchFileresult and still reads the node back, because not every driver fills it.#976 patched the legacy upload session store, which workpackages removed. Its two halves move to where uploads live now:
Decomposedfs.recoverInterruptedUpload, called fromDownload. The coordinator stages sessions in the same<upload dir>/<id>and<id>.infolayout as the old store, so nodes stuck by older versions still heal on the first download.PrepareUploadthe staged file (UploadInfo.Source). With a blobstore that keeps blobs apart from the nodes (decomposed, decomposeds3)PrepareUploadstores the blob, then switches the node without a processing mark and reportsCommitted, soCommitUploadandMarkProcessingare skipped. Posix and the other drivers ignoreSourceand keep the old flow.Review focus:
PrepareUploadinpkg/storage/pkg/decomposedfs/prepare_upload.go: is the order right? For an existing file the blob is stored under the node lock after the etag and quota checks, for a new file before the node exists. The revisions kept for a rollback are only removed after the size was propagated.PrepareUploadwrapsstorage.ErrSourceNotStoredand the coordinator keeps the session as failed, like after a failed commit. If writing the node fails, the old metadata is put back but the new blob is kept, because the write might have happened anyway. We rather leak a blob than lose content.pkg/storage/pkg/decomposedfs/recover.go: the 10 minuteinterruptedUploadAgebefore an upload is taken for interrupted.Not part of this PR:
upload_directory: decomposedfs: interrupted upload recovery ignores a service level upload_directory #1003Review commit by commit.
Assisted by Claude Code (claude-opus-5-5 and claude-fable-5-2): it prepared the merge, moved the upload fix to the coordinator, reviewed and fixed the result, and wrote this description.