mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-09 14:25:08 -04:00
Exclude soft-failed events from fwd-extremity candidates. (#5146)
When considering the candidates to be forward-extremities, we must exclude soft failures. Hopefully fixes #5090.
This commit is contained in:
parent
bab3eddac4
commit
c4aef549ad
3 changed files with 14 additions and 3 deletions
|
@ -575,10 +575,11 @@ class EventsStore(
|
|||
|
||||
def _get_events(txn, batch):
|
||||
sql = """
|
||||
SELECT prev_event_id
|
||||
SELECT prev_event_id, internal_metadata
|
||||
FROM event_edges
|
||||
INNER JOIN events USING (event_id)
|
||||
LEFT JOIN rejections USING (event_id)
|
||||
LEFT JOIN event_json USING (event_id)
|
||||
WHERE
|
||||
prev_event_id IN (%s)
|
||||
AND NOT events.outlier
|
||||
|
@ -588,7 +589,11 @@ class EventsStore(
|
|||
)
|
||||
|
||||
txn.execute(sql, batch)
|
||||
results.extend(r[0] for r in txn)
|
||||
results.extend(
|
||||
r[0]
|
||||
for r in txn
|
||||
if not json.loads(r[1]).get("soft_failed")
|
||||
)
|
||||
|
||||
for chunk in batch_iter(event_ids, 100):
|
||||
yield self.runInteraction("_get_events_which_are_prevs", _get_events, chunk)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue