Err, delete the right stuff
parent
30c72d377e
commit
8b28209c60
|
@ -336,20 +336,21 @@ class EventFederationStore(SQLBaseStore):
|
|||
" SELECT 1 FROM event_backward_extremities"
|
||||
" WHERE event_id = ? AND room_id = ?"
|
||||
" )"
|
||||
" AND NOT EXISTS ("
|
||||
" SELECT 1 FROM events WHERE event_id = ? AND room_id = ?"
|
||||
" )"
|
||||
)
|
||||
|
||||
txn.executemany(query, [
|
||||
(e_id, room_id, e_id, room_id, )
|
||||
(e_id, room_id, e_id, room_id, e_id, room_id, )
|
||||
for e_id, _ in prev_events
|
||||
])
|
||||
|
||||
# Also delete from the backwards extremities table all ones that
|
||||
# reference events that we have already seen
|
||||
query = (
|
||||
"DELETE FROM event_backward_extremities"
|
||||
" WHERE event_id = ? AND room_id = ?"
|
||||
)
|
||||
txn.executemany(query, [(e_id, room_id) for e_id, _ in prev_events])
|
||||
txn.execute(query, (event_id, room_id))
|
||||
|
||||
txn.call_after(
|
||||
self.get_latest_event_ids_in_room.invalidate, room_id
|
||||
|
|
Loading…
Reference in New Issue