diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2018-07-25 11:56:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-25 11:56:00 +0100 |
commit | cee1ae1b72bcbf5d173ca2f5eef5e947cc5e69f7 (patch) | |
tree | ce6789d45874397255e53623f665bb5ad7264d6f /synapse/storage/events.py | |
parent | Merge pull request #3607 from matrix-org/rav/fix_persist_events_integrity_error (diff) | |
parent | Fix another logcontext leak in _persist_events (diff) | |
download | synapse-cee1ae1b72bcbf5d173ca2f5eef5e947cc5e69f7.tar.xz |
Merge pull request #3606 from matrix-org/rav/logcontext_fixes_once_more
Fix another logcontext leak in _persist_events
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r-- | synapse/storage/events.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index f7c4226ea2..d39796f5ba 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -142,15 +142,14 @@ class _EventPeristenceQueue(object): try: queue = self._get_drainining_queue(room_id) for item in queue: - # handle_queue_loop runs in the sentinel logcontext, so - # there is no need to preserve_fn when running the - # callbacks on the deferred. try: ret = yield per_item_callback(item) + except Exception: + with PreserveLoggingContext(): + item.deferred.errback() + else: with PreserveLoggingContext(): item.deferred.callback(ret) - except Exception: - item.deferred.errback() finally: queue = self._event_persist_queues.pop(room_id, None) if queue: |