dendrite/federationapi/routing
Kegsay f8d3a762c4
Add a per-room mutex to federationapi when processing transactions (#1810)
* Add a per-room mutex to federationapi when processing transactions

This has numerous benefits:
 - Prevents us doing lots of state resolutions in busy rooms. Previously, room forks would always result
   in a state resolution being performed immediately, without checking if we were already doing this in
   a different transaction. Now they will queue up, resulting in fewer calls to `/state_ids`, `/g_m_e`, etc.
 - Prevents memory usage from growing too large as a result and potentially OOMing.

And costs:
 - High traffic rooms will be slightly slower due to head-of-line blocking from other servers,
   though this has always been an issue as roomserver has a per-room mutex already.

* Fix unit tests

* Correct mutex lock ordering
2021-03-30 10:01:32 +01:00
..
backfill.go Top-level setup package (#1605) 2020-12-02 17:41:00 +00:00
devices.go Use [] not null when there are no devices (#1480) 2020-10-06 11:05:15 +01:00
eventauth.go Consolidation of roomserver APIs (#994) 2020-05-01 10:48:17 +01:00
events.go Pass pointers to events — reloaded (#1583) 2020-11-16 15:44:53 +00:00
invite.go Top-level setup package (#1605) 2020-12-02 17:41:00 +00:00
join.go Increase gocyclo complexity to 25 (and remove all but 2 golint directives related to it) (#1783) 2021-03-03 14:35:57 +00:00
keys.go Top-level setup package (#1605) 2020-12-02 17:41:00 +00:00
leave.go Increase gocyclo complexity to 25 (and remove all but 2 golint directives related to it) (#1783) 2021-03-03 14:35:57 +00:00
missingevents.go Pass pointers to events — reloaded (#1583) 2020-11-16 15:44:53 +00:00
peek.go Peeking over federation via MSC2444 (#1391) 2021-01-22 14:55:08 +00:00
profile.go Top-level setup package (#1605) 2020-12-02 17:41:00 +00:00
publicrooms.go Increase gocyclo complexity to 25 (and remove all but 2 golint directives related to it) (#1783) 2021-03-03 14:35:57 +00:00
query.go Fix appsevice alias queries part 2 (#1684) 2021-03-03 17:00:31 +00:00
routing.go Add a per-room mutex to federationapi when processing transactions (#1810) 2021-03-30 10:01:32 +01:00
send_test.go Add a per-room mutex to federationapi when processing transactions (#1810) 2021-03-30 10:01:32 +01:00
send.go Add a per-room mutex to federationapi when processing transactions (#1810) 2021-03-30 10:01:32 +01:00
state.go Pass pointers to events — reloaded (#1583) 2020-11-16 15:44:53 +00:00
threepid.go Top-level setup package (#1605) 2020-12-02 17:41:00 +00:00
version.go Version imprint (#1383) 2020-09-02 16:18:08 +01:00