element-hq / element-hq/synapse
`Tried to activate scope outside of logging context` in `EndToEndKeyWorkerStore`
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#12249](https://github.com/matrix-org/synapse/issues/12249).
---
While looking through the most frequent sentry reports, I spotted that we have seen only one scope outside of logging context error in the last 30 days:
https://sentry.matrix.org/sentry/synapse-matrixorg/issues/15805/events/5222619/
Regrettably, synapse logs have already rotated out. But the transaction `invalidate_cache_and_stream`
https://github.com/matrix-org/synapse/blob/c486fa5fd9082643e40a55ffa59d902aa6db4c2b/synapse/storage/databases/main/cache.py#L216-L236
is called in two places: one inside `claim_e2e_one_time_keys`
https://github.com/matrix-org/synapse/blob/2cc5ea933dbe65445e3711bb3f05022b007029ea/synapse/storage/databases/main/end_to_end_keys.py#L1095-L1097
and another inside `set_e2e_fallback_keys`:
https://github.com/matrix-org/synapse/blob/2cc5ea933dbe65445e3711bb3f05022b007029ea/synapse/storage/databases/main/end_to_end_keys.py#L573-L575
Contributor guide
Assessment
This issue has not been assessed yet.