Roomserver per-room input parallelisation (Postgres) (#1289)

* Per-room input mutex

* GetMembership should use transaction when assigning state key NID

* Actually use writer transactions rather than ignoring them

* Limit per-room mutexes to Postgres

* Flip the check in InputRoomEvents
This commit is contained in:
Neil Alexander 2020-08-20 16:24:33 +01:00 committed by GitHub
parent 0fea056db4
commit 068a3d3c9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 68 additions and 36 deletions

View file

@ -139,6 +139,14 @@ func Open(dbProperties *config.DatabaseOptions) (*Database, error) {
return &d, nil
}
func (d *Database) SupportsConcurrentRoomInputs() bool {
// This isn't supported in SQLite mode yet because of issues with
// database locks.
// TODO: Look at this again - the problem is probably to do with
// the membership updaters and latest events updaters.
return false
}
func (d *Database) GetLatestEventsForUpdate(
ctx context.Context, roomNID types.RoomNID,
) (*shared.LatestEventsUpdater, error) {