-
- Downloads
Fix races in room stats (and other) updates. (#6187)
Hopefully this will fix the occasional failures we were seeing in the room directory. The problem was that events are not necessarily persisted (and `current_state_delta_stream` updated) in the same order as their stream_id. So for instance current_state_delta 9 might be persisted *before* current_state_delta 8. Then, when the room stats saw stream_id 9, it assumed it had done everything up to 9, and never came back to do stream_id 8. We can solve this easily by only processing up to the stream_id where we know all events have been persisted.
Showing
- changelog.d/6187.bugfix 1 addition, 0 deletionschangelog.d/6187.bugfix
- synapse/handlers/presence.py 12 additions, 4 deletionssynapse/handlers/presence.py
- synapse/handlers/stats.py 7 additions, 5 deletionssynapse/handlers/stats.py
- synapse/handlers/user_directory.py 12 additions, 5 deletionssynapse/handlers/user_directory.py
- synapse/storage/state_deltas.py 29 additions, 9 deletionssynapse/storage/state_deltas.py
- tests/handlers/test_typing.py 1 addition, 1 deletiontests/handlers/test_typing.py
- tests/rest/admin/test_admin.py 1 addition, 1 deletiontests/rest/admin/test_admin.py
Loading
Please register or sign in to comment