mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 06:12:45 +00:00
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:
parent
0fea056db4
commit
068a3d3c9f
12 changed files with 68 additions and 36 deletions
|
@ -276,9 +276,10 @@ func (s *eventStatements) BulkSelectStateAtEventByID(
|
|||
}
|
||||
|
||||
func (s *eventStatements) UpdateEventState(
|
||||
ctx context.Context, eventNID types.EventNID, stateNID types.StateSnapshotNID,
|
||||
ctx context.Context, txn *sql.Tx, eventNID types.EventNID, stateNID types.StateSnapshotNID,
|
||||
) error {
|
||||
_, err := s.updateEventStateStmt.ExecContext(ctx, int64(eventNID), int64(stateNID))
|
||||
stmt := sqlutil.TxStmt(txn, s.updateEventStateStmt)
|
||||
_, err := stmt.ExecContext(ctx, int64(eventNID), int64(stateNID))
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue