Skip to content

[stable31] [stable33] fix(propagator): Improve lock behavior of propagator - #58390

Draft
backportbot[bot] wants to merge 2 commits into
stable31from
backport/58198/stable31
Draft

backportbot[bot] wants to merge 2 commits into
stable31from
backport/58198/stable31

Conversation

@backportbot

@backportbot backportbot Bot commented Feb 17, 2026 •

Copy link
Copy Markdown

Backport of #58198

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 17, 2026
@backportbot backportbot Bot self-assigned this Feb 17, 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>
@CarlSchwan
CarlSchwan force-pushed the backport/58198/stable31 branch from fd9fec9 to a7068ee Compare February 20, 2026 14:31

This branch has not been deployed

No deployments
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.

3 participants