aboutsummaryrefslogtreecommitdiff
path: root/roomserver/internal/api.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-08-20 16:24:33 +0100
committerGitHub <noreply@github.com>2020-08-20 16:24:33 +0100
commit068a3d3c9f9be3473b68e3a13912182caf1c7117 (patch)
tree1a4731a46ea5f484c573b7245a078bae1f9c4b8e /roomserver/internal/api.go
parent0fea056db43c11c5de97fd96bcc60703ca1b4c08 (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.go4
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
}