mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-25 13:11:37 +00:00
Repeatable reads for /sync
(#2783)
This puts repeatable reads into all sync streams. Co-authored-by: kegsay <kegan@matrix.org>
This commit is contained in:
parent
ded43e0f2d
commit
ba2ffb7da9
@ -57,13 +57,6 @@ type Database struct {
|
||||
}
|
||||
|
||||
func (d *Database) NewDatabaseSnapshot(ctx context.Context) (*DatabaseTransaction, error) {
|
||||
return d.NewDatabaseTransaction(ctx)
|
||||
|
||||
/*
|
||||
TODO: Repeatable read is probably the right thing to do here,
|
||||
but it seems to cause some problems with the invite tests, so
|
||||
need to investigate that further.
|
||||
|
||||
txn, err := d.DB.BeginTx(ctx, &sql.TxOptions{
|
||||
// Set the isolation level so that we see a snapshot of the database.
|
||||
// In PostgreSQL repeatable read transactions will see a snapshot taken
|
||||
@ -81,7 +74,6 @@ func (d *Database) NewDatabaseSnapshot(ctx context.Context) (*DatabaseTransactio
|
||||
ctx: ctx,
|
||||
txn: txn,
|
||||
}, nil
|
||||
*/
|
||||
}
|
||||
|
||||
func (d *Database) NewDatabaseTransaction(ctx context.Context) (*DatabaseTransaction, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user