diff options
author | kegsay <kegan@matrix.org> | 2021-07-26 12:30:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-26 12:30:44 +0100 |
commit | 16bf94f2391b5334fe2ff8eae52f2f5b46951f4e (patch) | |
tree | 30c3c199fe9a4f0b3fac3dc847cde524b5c90c56 /roomserver | |
parent | fa1ec482a7bd35d1cb900f727edd0dcbb1d7c45c (diff) |
Not finding the snapshot is not fatal (#1940)
Diffstat (limited to 'roomserver')
-rw-r--r-- | roomserver/storage/postgres/deltas/2021041615092700_state_blocks_refactor.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/roomserver/storage/postgres/deltas/2021041615092700_state_blocks_refactor.go b/roomserver/storage/postgres/deltas/2021041615092700_state_blocks_refactor.go index 26d88e00..940a920e 100644 --- a/roomserver/storage/postgres/deltas/2021041615092700_state_blocks_refactor.go +++ b/roomserver/storage/postgres/deltas/2021041615092700_state_blocks_refactor.go @@ -174,6 +174,9 @@ func UpStateBlocksRefactor(tx *sql.Tx) error { err = tx.QueryRow( `SELECT event_nid FROM roomserver_events WHERE state_snapshot_nid = $1 AND event_type_nid = 1`, s.StateSnapshotNID, ).Scan(&createEventNID) + if err == sql.ErrNoRows { + continue + } if err != nil { return fmt.Errorf("cannot xref null state block with snapshot %d: %s", s.StateSnapshotNID, err) } |