Don't fail hard if backward topology position fails, just use 1 instead
MODIFY
syncapi/storage/postgres/syncserver.go
syncapi/storage/postgres/syncserver.go
@@ -619,9 +619,6 @@ func (d *SyncServerDatasource) getResponseWithPDUsForCompleteSync(
// oldest event in the room's topology.
var backwardTopologyPos types.StreamPosition
backwardTopologyPos, err = d.topology.selectPositionInTopology(ctx, recentStreamEvents[0].EventID())
- if err != nil {
- return nil, types.PaginationToken{}, []string{}, err
- }
if backwardTopologyPos-1 <= 0 {
backwardTopologyPos = types.StreamPosition(1)
} else {

MODIFY
syncapi/storage/sqlite3/syncserver.go
syncapi/storage/sqlite3/syncserver.go
@@ -657,10 +657,6 @@ func (d *SyncServerDatasource) getResponseWithPDUsForCompleteSync(
// oldest event in the room's topology.
var backwardTopologyPos types.StreamPosition
backwardTopologyPos, err = d.topology.selectPositionInTopology(ctx, txn, recentStreamEvents[0].EventID())
- if err != nil {
- return nil, types.PaginationToken{}, []string{}, err
- }
-
if backwardTopologyPos-1 <= 0 {
backwardTopologyPos = types.StreamPosition(1)
} else {

Don't fail hard if backward topology position fails, just use 1 instead