summary refs log tree commit diff
path: root/synapse/util
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-01-14 18:57:32 +0000
committerGitHub <noreply@github.com>2021-01-14 18:57:32 +0000
commit1a08e0cdab0b3475fd4189aa1e3b6f9aaa823ccf (patch)
tree8e0363d387ddf7ee01c92ee95cff12850fe6a588 /synapse/util
parentFix perf of get_cross_signing_keys (#9116) (diff)
downloadsynapse-1a08e0cdab0b3475fd4189aa1e3b6f9aaa823ccf.tar.xz
Fix event chain bg update. (#9118)
We passed in a graph to `sorted_topologically` which didn't have an
entry for each node (as we dropped nodes with no edges).
Diffstat (limited to 'synapse/util')
-rw-r--r--synapse/util/iterutils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/util/iterutils.py b/synapse/util/iterutils.py
index f7b4857a84..6ef2b008a4 100644
--- a/synapse/util/iterutils.py
+++ b/synapse/util/iterutils.py
@@ -92,7 +92,7 @@ def sorted_topologically(
         node = heapq.heappop(zero_degree)
         yield node
 
-        for edge in reverse_graph[node]:
+        for edge in reverse_graph.get(node, []):
             if edge in degree_map:
                 degree_map[edge] -= 1
                 if degree_map[edge] == 0: