Skip to content

fix: revision handling for parallel uploads to the same node - #414

Merged
butonic merged 2 commits into
opencloud-eu:mainfrom
rhafer:ocissue/1763
Nov 18, 2025
Merged

butonic merged 2 commits into
opencloud-eu:mainfrom
rhafer:ocissue/1763

Conversation

@rhafer

@rhafer rhafer commented Nov 11, 2025 •

Copy link
Copy Markdown
Member

When multiple uploads on the same node are in post-processing at the same time the upload that enters post-processing 2nd will created a new file revision.
However if the upload finished post-processing before the 1st upload the blob of the first upload ended up over-writing the original node. We now make sure that the 1st upload's session is set to write the blob to the revision node.

Closes: opencloud-eu/opencloud#1867

@rhafer rhafer self-assigned this Nov 11, 2025
@rhafer
rhafer force-pushed the ocissue/1763 branch 3 times, most recently from c55f407 to b2a0599 Compare November 12, 2025 15:35
@rhafer rhafer changed the title fix: revision handling for parallel upload to the same node fix: revision handling for parallel uploads to the same node Nov 13, 2025
@rhafer
rhafer force-pushed the ocissue/1763 branch 3 times, most recently from 7f6c0c1 to 7228909 Compare November 13, 2025 18:46
@rhafer
rhafer force-pushed the ocissue/1763 branch 6 times, most recently from 63725dc to 771319a Compare November 18, 2025 08:17
When multiple uploads on the same node are in post-processing at the
same time the upload that enters post-processing 2nd will create a
new file revision where the 1st upload is supposed to endup.
However if the upload finished post-processing before the 1st upload
the blob of the first upload ended up over-writing the original node.
We now make sure that the 1st upload is writing the blob to the revision
node.

Closes: cs3org#1867
The "hybrid" metabackend created the metadata lock on the wrong file
(*.flock instead *.mlock) when locking the metadata.
@rhafer
rhafer marked this pull request as ready for review November 18, 2025 10:13
@rhafer

rhafer commented Nov 18, 2025

Copy link
Copy Markdown
Member Author

This still fails in the antiVirus test sometimes (see e.g. https://ci.opencloud.eu/repos/3/pipeline/565/70), but that is not a new issue. See e.g. here opencloud-eu/qa#50 (comment), back then I still hoped that I could fix that in this PR as well, but I'd really prefer to keep this small (and digestible) and get this one merged now as it already fixes quite some corruptions, many of which went unnoticed by the tests.

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.

posixfs: metadata corruption on parallel uploads

2 participants