Not finding the snapshot is not fatal (#1940)
parent
fa1ec482a7
commit
16bf94f239
|
@ -174,6 +174,9 @@ func UpStateBlocksRefactor(tx *sql.Tx) error {
|
||||||
err = tx.QueryRow(
|
err = tx.QueryRow(
|
||||||
`SELECT event_nid FROM roomserver_events WHERE state_snapshot_nid = $1 AND event_type_nid = 1`, s.StateSnapshotNID,
|
`SELECT event_nid FROM roomserver_events WHERE state_snapshot_nid = $1 AND event_type_nid = 1`, s.StateSnapshotNID,
|
||||||
).Scan(&createEventNID)
|
).Scan(&createEventNID)
|
||||||
|
if err == sql.ErrNoRows {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("cannot xref null state block with snapshot %d: %s", s.StateSnapshotNID, err)
|
return fmt.Errorf("cannot xref null state block with snapshot %d: %s", s.StateSnapshotNID, err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue