Handle cancellation in `EventsWorkerStore._get_events_from_cache_or_db` (#12529)
Multiple calls to `EventsWorkerStore._get_events_from_cache_or_db` can
reuse the same database fetch, which is initiated by the first call.
Ensure that cancelling the first call doesn't cancel the other calls
sharing the same database fetch.
Signed-off-by:
Sean Quah <seanq@element.io>
Showing
- changelog.d/12529.misc 1 addition, 0 deletionschangelog.d/12529.misc
- synapse/storage/databases/main/events_worker.py 49 additions, 34 deletionssynapse/storage/databases/main/events_worker.py
- tests/storage/databases/main/test_events_worker.py 119 additions, 2 deletionstests/storage/databases/main/test_events_worker.py
changelog.d/12529.misc
0 → 100644
Please register or sign in to comment