mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-10 22:57:41 -05:00
This fixes a race whereby: - User hits an endpoint. - No cached transaction so executes main code. - User hits same endpoint. - No cache transaction so executes main code. - Main code finishes executing and caches response and returns. - Main code finishes executing and caches response and returns. This race is common in the wild when Synapse is struggling under load. This commit fixes the race by: - User hits an endpoint. - Caches the promise to execute the main code and executes main code. - User hits same endpoint. - Yields on the same promise as the first request. - Main code finishes executing and returns, unblocking both requests. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| _base.py | ||
| account.py | ||
| account_data.py | ||
| auth.py | ||
| devices.py | ||
| filter.py | ||
| keys.py | ||
| notifications.py | ||
| openid.py | ||
| receipts.py | ||
| register.py | ||
| report_event.py | ||
| sendtodevice.py | ||
| sync.py | ||
| tags.py | ||
| thirdparty.py | ||
| tokenrefresh.py | ||