summary refs log tree commit diff
path: root/synapse/handlers/events.py
diff options
context:
space:
mode:
authorSean Quah <8349537+squahtx@users.noreply.github.com>2021-10-08 12:27:16 +0100
committerGitHub <noreply@github.com>2021-10-08 12:27:16 +0100
commit49a683d871add82fb1a8125c6803ac15ec7d341b (patch)
treea565024f2db39f4cf6987ec2853dbc43e625a3c9 /synapse/handlers/events.py
parentInclude exception in json logging (#11028) (diff)
downloadsynapse-49a683d871add82fb1a8125c6803ac15ec7d341b.tar.xz
Fix long-standing bug where `ReadWriteLock` could drop logging contexts (#10993)
Use `PreserveLoggingContext()` to ensure that logging contexts are not
lost when exiting a read/write lock.

When exiting a read/write lock, callbacks on a `Deferred` are triggered
as a signal to any waiting coroutines. Any waiting coroutine that
becomes runnable is likely to follow the Synapse logging context rules
and will restore its own logging context, then either run to completion
or await another `Deferred`, resetting the logging context in the
process.
Diffstat (limited to 'synapse/handlers/events.py')
0 files changed, 0 insertions, 0 deletions