mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Merge branch 'fix' of github.com:matrix-org/synapse into hotfixes-v0.7.0a
This commit is contained in:
commit
6b186a57ba
@ -55,17 +55,16 @@ class EventFederationStore(SQLBaseStore):
|
|||||||
results = set()
|
results = set()
|
||||||
|
|
||||||
base_sql = (
|
base_sql = (
|
||||||
"SELECT auth_id FROM event_auth WHERE %s"
|
"SELECT auth_id FROM event_auth WHERE event_id = ?"
|
||||||
)
|
)
|
||||||
|
|
||||||
front = set(event_ids)
|
front = set(event_ids)
|
||||||
while front:
|
while front:
|
||||||
sql = base_sql % (
|
new_front = set()
|
||||||
" OR ".join(["event_id=?"] * len(front)),
|
for f in front:
|
||||||
)
|
txn.execute(base_sql, (f,))
|
||||||
|
new_front.update([r[0] for r in txn.fetchall()])
|
||||||
txn.execute(sql, list(front))
|
front = new_front
|
||||||
front = [r[0] for r in txn.fetchall()]
|
|
||||||
results.update(front)
|
results.update(front)
|
||||||
|
|
||||||
return list(results)
|
return list(results)
|
||||||
|
Loading…
Reference in New Issue
Block a user