Skip to content

Conversation

@icewind1991
Copy link
Member

@icewind1991 icewind1991 commented Apr 3, 2025

When a race condition happens, we need to ensure the folder also exists in cache before we return.

To test:

  • create a new user (or delete the uploads folder for an existing user from both disk and cache)
  • Upload multiple 100mb+ (to trigger chunking) files at the same time

Without this patch, some of the uploads will fail sometimes (failure rate will depend on random factors), with this patch all uploads always succeed

@ShGKme
Copy link
Contributor

ShGKme commented Apr 4, 2025

/backport! to stable29

Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 added the 3. to review Waiting for reviews label May 8, 2025
@icewind1991 icewind1991 added this to the Nextcloud 32 milestone May 8, 2025
@icewind1991 icewind1991 force-pushed the newfolder-race-improvements branch from 8600151 to 99364ad Compare May 8, 2025 13:36
@icewind1991 icewind1991 marked this pull request as ready for review May 8, 2025 15:28
@icewind1991 icewind1991 requested a review from a team as a code owner May 8, 2025 15:28
@icewind1991 icewind1991 requested review from artonge, come-nc and nfebe and removed request for a team May 8, 2025 15:28
@come-nc come-nc merged commit 2f1c74d into master May 13, 2025
212 of 221 checks passed
@come-nc come-nc deleted the newfolder-race-improvements branch May 13, 2025 07:16
@icewind1991
Copy link
Member Author

/backport to stable30

@skjnldsv skjnldsv added this to the Nextcloud 32 milestone Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants