Roomserver database-wide TransactionWriters (#1282)

* Database-wide TransactionWriter

* Fix deadlocking Sync API tests

* Undo non-roomserver changes for now
This commit is contained in:
Neil Alexander 2020-08-19 10:57:29 +01:00 committed by GitHub
parent e571e196ce
commit 3d58417555
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 44 additions and 43 deletions

View file

@ -51,10 +51,10 @@ type publishedStatements struct {
selectPublishedStmt *sql.Stmt
}
func NewSqlitePublishedTable(db *sql.DB) (tables.Published, error) {
func NewSqlitePublishedTable(db *sql.DB, writer *sqlutil.TransactionWriter) (tables.Published, error) {
s := &publishedStatements{
db: db,
writer: sqlutil.NewTransactionWriter(),
writer: writer,
}
_, err := db.Exec(publishedSchema)
if err != nil {