diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-08-20 16:24:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-20 16:24:33 +0100 |
commit | 068a3d3c9f9be3473b68e3a13912182caf1c7117 (patch) | |
tree | 1a4731a46ea5f484c573b7245a078bae1f9c4b8e /roomserver/internal/api.go | |
parent | 0fea056db43c11c5de97fd96bcc60703ca1b4c08 (diff) |
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
Diffstat (limited to 'roomserver/internal/api.go')
-rw-r--r-- | roomserver/internal/api.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/roomserver/internal/api.go b/roomserver/internal/api.go index 6d7c8fcf..efe9bdcd 100644 --- a/roomserver/internal/api.go +++ b/roomserver/internal/api.go @@ -20,7 +20,7 @@ type RoomserverInternalAPI struct { ServerName gomatrixserverlib.ServerName KeyRing gomatrixserverlib.JSONVerifier FedClient *gomatrixserverlib.FederationClient - OutputRoomEventTopic string // Kafka topic for new output room events - mutex sync.Mutex // Protects calls to processRoomEvent + OutputRoomEventTopic string // Kafka topic for new output room events + mutexes sync.Map // room ID -> *sync.Mutex, protects calls to processRoomEvent fsAPI fsAPI.FederationSenderInternalAPI } |