From 49a683d871add82fb1a8125c6803ac15ec7d341b Mon Sep 17 00:00:00 2001 From: Sean Quah <8349537+squahtx@users.noreply.github.com> Date: Fri, 8 Oct 2021 12:27:16 +0100 Subject: 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. --- changelog.d/10993.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/10993.misc (limited to 'changelog.d') diff --git a/changelog.d/10993.misc b/changelog.d/10993.misc new file mode 100644 index 0000000000..23c73dbac5 --- /dev/null +++ b/changelog.d/10993.misc @@ -0,0 +1 @@ +Fix a long-standing bug where `ReadWriteLock`s could drop logging contexts on exit. -- cgit 1.4.1