Files
synapse/synapse/storage
Olivier 'reivilibreandGitHub 292bbb8f30 Fix a bug causing device list pruning to skip some rows when the transaction gets retried. (#19947)
Introduced in: #19473

Noticed in:
https://github.com/element-hq/synapse/pull/19556#discussion_r3505783541

I have not experienced the bug in the real world, it's just something I
noticed by reading.

--

Fix bug in `_prune_device_lists_changes_in_room` when transaction is
retried
The `nonlocal` variable is a footgun as it increments the counter even
though the transaction did not commit yet and may still be retried.

---------

Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
2026-07-13 13:32:09 +01:00
..