Commit 292bbb8
authored
Fix a bug causing device list pruning to skip some rows when the transaction gets retried. (#19947)
Introduced in: #19473
Noticed in:
#19556 (comment)
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>1 parent 733620a commit 292bbb8
2 files changed
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2561 | 2561 | | |
2562 | 2562 | | |
2563 | 2563 | | |
2564 | | - | |
2565 | | - | |
2566 | | - | |
| 2564 | + | |
| 2565 | + | |
| 2566 | + | |
| 2567 | + | |
| 2568 | + | |
| 2569 | + | |
| 2570 | + | |
| 2571 | + | |
2567 | 2572 | | |
2568 | 2573 | | |
2569 | 2574 | | |
| |||
2596 | 2601 | | |
2597 | 2602 | | |
2598 | 2603 | | |
2599 | | - | |
| 2604 | + | |
2600 | 2605 | | |
2601 | 2606 | | |
2602 | 2607 | | |
2603 | | - | |
| 2608 | + | |
2604 | 2609 | | |
2605 | 2610 | | |
| 2611 | + | |
2606 | 2612 | | |
2607 | 2613 | | |
2608 | 2614 | | |
| |||
0 commit comments