Skip to content

[stable33] fix(propagator): Improve lock behavior of propagator#58198

Draft
backportbot[bot] wants to merge 2 commits intostable33from
backport/58134/stable33
Draft

[stable33] fix(propagator): Improve lock behavior of propagator#58198
backportbot[bot] wants to merge 2 commits intostable33from
backport/58134/stable33

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Feb 9, 2026

Backport of #58134

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot backportbot bot added 3. to review Waiting for reviews feature: database Database related DB labels Feb 9, 2026
@backportbot backportbot bot added this to the Nextcloud 33 milestone Feb 9, 2026
Fix possible dead locks when running the propagator caused by two
requests updating the same amount rows in transactions.

- Lock rows always in the same deterministic order by sorting the
  path_hash first

- On all database outside of sqlite, also do first a SELECT FOR UPDATE
  to lock all the rows used in batch UPDATE calls, afterward to decrease
  the risk of two requests trying to lock the same rows

Signed-off-by: Carl Schwan <carlschwan@kde.org>
Signed-off-by: Carl Schwan <carlschwan@kde.org>

[skip ci]
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 feature: database Database related DB

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant