diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-08-19 10:57:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-19 10:57:29 +0100 |
commit | 3d58417555ef6a1308fec8b83e752016765b72f2 (patch) | |
tree | 579289b1a68de917663c6ae1a5983a01b586d4cd /roomserver/storage/sqlite3/transactions_table.go | |
parent | e571e196ce67581996b429f349527015038afb86 (diff) |
Roomserver database-wide TransactionWriters (#1282)
* Database-wide TransactionWriter
* Fix deadlocking Sync API tests
* Undo non-roomserver changes for now
Diffstat (limited to 'roomserver/storage/sqlite3/transactions_table.go')
-rw-r--r-- | roomserver/storage/sqlite3/transactions_table.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/roomserver/storage/sqlite3/transactions_table.go b/roomserver/storage/sqlite3/transactions_table.go index 2f6cff95..65c18a8a 100644 --- a/roomserver/storage/sqlite3/transactions_table.go +++ b/roomserver/storage/sqlite3/transactions_table.go @@ -50,10 +50,10 @@ type transactionStatements struct { selectTransactionEventIDStmt *sql.Stmt } -func NewSqliteTransactionsTable(db *sql.DB) (tables.Transactions, error) { +func NewSqliteTransactionsTable(db *sql.DB, writer *sqlutil.TransactionWriter) (tables.Transactions, error) { s := &transactionStatements{ db: db, - writer: sqlutil.NewTransactionWriter(), + writer: writer, } _, err := db.Exec(transactionsSchema) if err != nil { |