mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-08 18:16:59 +00:00
Tweaks to backfill (#964)
This commit is contained in:
parent
895a72b6ee
commit
7b3edf4622
@ -93,7 +93,7 @@ func Backfill(
|
||||
}
|
||||
|
||||
var eventJSONs []json.RawMessage
|
||||
for _, e := range evs {
|
||||
for _, e := range gomatrixserverlib.ReverseTopologicalOrdering(evs) {
|
||||
eventJSONs = append(eventJSONs, e.JSON())
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ const insertBackwardExtremitySQL = "" +
|
||||
" ON CONFLICT DO NOTHING"
|
||||
|
||||
const selectBackwardExtremitiesForRoomSQL = "" +
|
||||
"SELECT event_id FROM syncapi_backward_extremities WHERE room_id = $1"
|
||||
"SELECT DISTINCT event_id FROM syncapi_backward_extremities WHERE room_id = $1"
|
||||
|
||||
const deleteBackwardExtremitySQL = "" +
|
||||
"DELETE FROM syncapi_backward_extremities WHERE room_id = $1 AND prev_event_id = $2"
|
||||
|
@ -60,7 +60,7 @@ const insertBackwardExtremitySQL = "" +
|
||||
" ON CONFLICT (room_id, event_id, prev_event_id) DO NOTHING"
|
||||
|
||||
const selectBackwardExtremitiesForRoomSQL = "" +
|
||||
"SELECT event_id FROM syncapi_backward_extremities WHERE room_id = $1"
|
||||
"SELECT DISTINCT event_id FROM syncapi_backward_extremities WHERE room_id = $1"
|
||||
|
||||
const deleteBackwardExtremitySQL = "" +
|
||||
"DELETE FROM syncapi_backward_extremities WHERE room_id = $1 AND prev_event_id = $2"
|
||||
|
Loading…
Reference in New Issue
Block a user