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

Commit

Permalink
bugfix: order the state blocks so recreating state snapshots works co…
Browse files Browse the repository at this point in the history
…rrectly (#1908)

* Logging

* Revert "Logging"

This reverts commit 23ce334.

* bugfix: order the state blocks so recreating state snapshots works correctly
  • Loading branch information
kegsay authored Jul 9, 2021
1 parent 816e1a4 commit 3e50bac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit 3e50bac

Please sign in to comment.