diff options
author | Jason Little <realtyem@gmail.com> | 2023-11-22 04:59:16 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-22 10:59:16 +0000 |
commit | 460743da16da5df041b135ba607404bc71f29341 (patch) | |
tree | 74778416ee756e96e3750b79680d46b00443398c /synapse/storage | |
parent | Merge branch 'release-v1.97' into develop (diff) | |
download | synapse-460743da16da5df041b135ba607404bc71f29341.tar.xz |
Filter out auth chain queries that don't exist (#16552)
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/databases/main/event_federation.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/storage/databases/main/event_federation.py b/synapse/storage/databases/main/event_federation.py index 7e992ca4a2..d5fb6ecc73 100644 --- a/synapse/storage/databases/main/event_federation.py +++ b/synapse/storage/databases/main/event_federation.py @@ -301,6 +301,11 @@ class EventFederationWorkerStore(SignatureWorkerStore, EventsWorkerStore, SQLBas # Add the initial set of chains, excluding the sequence corresponding to # initial event. for chain_id, seq_no in event_chains.items(): + # Check if the initial event is the first item in the chain. If so, then + # there is nothing new to add from this chain. + if seq_no == 1: + continue + chains[chain_id] = max(seq_no - 1, chains.get(chain_id, 0)) # Now for each chain we figure out the maximum sequence number reachable |