bugfix: order the state blocks so recreating state snapshots works correctly

This commit is contained in:
Kegan Dougal 2021-07-09 10:21:11 +01:00
parent a41ba7e149
commit db63873e86
2 changed files with 2 additions and 2 deletions

View file

@ -64,7 +64,7 @@ const insertStateDataSQL = "" +
const bulkSelectStateBlockEntriesSQL = "" + const bulkSelectStateBlockEntriesSQL = "" +
"SELECT state_block_nid, event_nids" + "SELECT state_block_nid, event_nids" +
" FROM roomserver_state_block WHERE state_block_nid = ANY($1)" " FROM roomserver_state_block WHERE state_block_nid = ANY($1) ORDER BY state_block_nid ASC"
type stateBlockStatements struct { type stateBlockStatements struct {
insertStateDataStmt *sql.Stmt insertStateDataStmt *sql.Stmt

View file

@ -57,7 +57,7 @@ const insertStateDataSQL = `
const bulkSelectStateBlockEntriesSQL = "" + const bulkSelectStateBlockEntriesSQL = "" +
"SELECT state_block_nid, event_nids" + "SELECT state_block_nid, event_nids" +
" FROM roomserver_state_block WHERE state_block_nid IN ($1)" " FROM roomserver_state_block WHERE state_block_nid IN ($1) ORDER BY state_block_nid ASC"
type stateBlockStatements struct { type stateBlockStatements struct {
db *sql.DB db *sql.DB