Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

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

Merged
merged 3 commits into from
Jul 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion roomserver/storage/postgres/state_block_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const insertStateDataSQL = "" +

const bulkSelectStateBlockEntriesSQL = "" +
"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 {
insertStateDataStmt *sql.Stmt
Expand Down
2 changes: 1 addition & 1 deletion roomserver/storage/sqlite3/state_block_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const insertStateDataSQL = `

const bulkSelectStateBlockEntriesSQL = "" +
"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 {
db *sql.DB
Expand Down