From 92517e95fce8d863f4faa67ad9d7778482af8000 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Wed, 26 Aug 2020 21:01:06 +0100 Subject: [PATCH] Assertion on bug --- synapse/federation/sender/per_destination_queue.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/synapse/federation/sender/per_destination_queue.py b/synapse/federation/sender/per_destination_queue.py index c36ec280f5..4c07d1f7fb 100644 --- a/synapse/federation/sender/per_destination_queue.py +++ b/synapse/federation/sender/per_destination_queue.py @@ -506,15 +506,17 @@ class PerDestinationQueue(object): # - don't need to worry about rejected events as we do not actively # forward received events over federation. events = await self._store.get_events_as_list(event_ids) + if not events: + raise AssertionError( + "No events retrieved when we asked for %r. " + "This should not happen." % event_ids + ) # zip them together with their stream orderings catch_up_pdus = [ (event, event.internal_metadata.stream_ordering) for event in events ] - if not catch_up_pdus: - break - success = await self._transaction_manager.send_new_transaction( self._destination, catch_up_pdus, [] )