Commit graph

213 commits

Author SHA1 Message Date
Neil Alexander 858cc61f92
Add back some lazy loading caching 2022-07-07 11:39:51 +01:00
Neil Alexander cafc45863e
Merge branch 'main' into neilalexander/ristretto 2022-07-01 12:00:42 +01:00
Neil Alexander b5c55faf98
Version 0.8.9 (#2549)
* Version 0.8.9

* Update changelog
2022-07-01 12:00:32 +01:00
Neil Alexander e064a97eb1
Various tweaks 2022-06-20 11:38:48 +01:00
Neil Alexander 6ff90fa0ee
Add config.DataUnit for specifying friendly cache sizes 2022-06-20 11:28:45 +01:00
Neil Alexander bf18f7d5ad
Configurable cache sizees 2022-06-16 16:43:49 +01:00
Neil Alexander 03cd7f041b
Clean up a bit 2022-06-16 09:50:40 +01:00
Neil Alexander ad40b054bc
Reduce counters a bit 2022-06-15 16:32:15 +01:00
Neil Alexander 8460f1dc08
Cost estimation fixes 2022-06-15 15:59:00 +01:00
Neil Alexander e0466c7777
Use a shared cache again 2022-06-15 14:54:13 +01:00
Neil Alexander e385c8d4c7
Cache expiries, async publishing of EDUs 2022-06-15 12:15:28 +01:00
Neil Alexander 21cfabbbfb
Try to fix bugs 2022-06-15 09:45:12 +01:00
Neil Alexander 07ce5b185f
Use separate caches for hopefully better hash distribution 2022-06-15 09:36:33 +01:00
Neil Alexander b7a908305e
Try this 2022-06-15 09:23:59 +01:00
Neil Alexander 9a3f483e9c
Try again 2022-06-14 16:57:16 +01:00
Neil Alexander 3f9617e373
Some guards 2022-06-14 16:52:27 +01:00
Neil Alexander c4c2c9d0ff
Try caching events 2022-06-14 16:45:13 +01:00
Neil Alexander 1fd4ec1bb6
Reduce counters a bit 2022-06-14 15:29:41 +01:00
Neil Alexander e4ccddf5b7
Estimate cost for metrics better 2022-06-14 15:20:17 +01:00
Neil Alexander f7e2cbbb16
Update cost estimation, add metric 2022-06-14 15:06:30 +01:00
Neil Alexander 345a01ce73
Make federation caches mutable 2022-06-14 14:41:15 +01:00
Neil Alexander da107c78da
Namespace keys 2022-06-14 14:39:28 +01:00
Neil Alexander 2f3cd2828e
Tweaks 2022-06-14 14:36:13 +01:00
Neil Alexander 8147d8367d
Determine mutability using deep equality 2022-06-14 14:29:59 +01:00
Neil Alexander e1f4a485f5
Don't enforce mutability checks for now 2022-06-14 14:18:37 +01:00
Neil Alexander 2488058e62
Make less panicky 2022-06-14 14:16:59 +01:00
Neil Alexander 800dbbf9e4
Fix that some more 2022-06-14 14:10:48 +01:00
Neil Alexander e614269bc3
More strict keyable interface 2022-06-14 14:08:09 +01:00
Neil Alexander 202b25a694
It's beautiful 2022-06-14 13:59:12 +01:00
Neil Alexander f948dc8c18
Tweak 2022-06-14 10:02:50 +01:00
Neil Alexander 4613203763
Try Ristretto cache 2022-06-14 09:56:51 +01:00
Neil Alexander 83797573be
Version 0.8.8 (#2525) 2022-06-09 12:18:50 +01:00
Neil Alexander 6d4bd5d890
Rate limiting changes (#2519)
* Rate limiting changes

This makes the following changes:

* For logged in users, the rate limiting now applies to the device session rather than the remote IP address;
* For non-logged in users, the rate limiting continues to apply to remote address as it does today;
* It is now possible to add user IDs to the `exempt_user_ids` option under `rate_limiting` to exclude bots from rate limiting;
* Admin and appservice users are now exempt from rate limiting by default.

* Fix build with media API
2022-06-07 14:24:04 +01:00
Neil Alexander f41931b566
Version 0.8.7 (#2509) 2022-06-01 11:40:37 +01:00
Neil Alexander 45c4c00672
Version 0.8.6 (#2497) 2022-05-26 13:01:04 +01:00
Neil Alexander 9e46d5025a
Upgrade various dependencies (#2496)
* Upgrade various dependencies

* Yaml dependency too
2022-05-26 12:34:43 +01:00
kegsay 6de29c1cd2
bugfix: E2EE device keys could sometimes not be sent to remote servers (#2466)
* Fix flakey sytest 'Local device key changes get to remote servers'

* Debug logs

* Remove internal/test and use /test only

Remove a lot of ancient code too.

* Use FederationRoomserverAPI in more places

* Use more interfaces in federationapi; begin adding regression test

* Linting

* Add regression test

* Unbreak tests

* ALL THE LOGS

* Fix a race condition which could cause events to not be sent to servers

If a new room event which rewrites state arrives, we remove all joined hosts
then re-calculate them. This wasn't done in a transaction so for a brief period
we would have no joined hosts. During this interim, key change events which arrive
would not be sent to destination servers. This would sporadically fail on sytest.

* Unbreak new tests

* Linting
2022-05-17 13:23:35 +01:00
Neil Alexander 6af35385ba
Version 0.8.5 (#2461)
* Version 0.8.5

* Update changelog

* Update changelog
2022-05-13 13:17:15 +01:00
Neil Alexander 1897e2f1c0
Version 0.8.4 2022-05-10 12:44:29 +01:00
Neil Alexander 77722c5a4f
Back out matrix-org/dendrite#2421 by restoring http.Clients
This creates problems with non-HTTPS endpoints and should fix #2444.
2022-05-10 11:08:10 +01:00
Neil Alexander 6b3c183396
Version 0.8.3 (#2431)
* Version 0.8.3

* Update changelog
2022-05-09 17:31:14 +01:00
Neil Alexander 633ca06eb9
Version 0.8.3rc1 2022-05-06 16:34:52 +01:00
Till 6493c0c0f2
Move LL cache (#2429) 2022-05-06 15:33:34 +02:00
kegsay 85704eff20
Clean up interface definitions (#2427)
* tidy up interfaces

* remove unused GetCreatorIDForAlias

* Add RoomserverUserAPI interface

* Define more interfaces

* Use AppServiceInternalAPI for consistent naming

* clean up federationapi constructor a bit

* Fix monolith in -http mode
2022-05-06 12:39:26 +01:00
kegsay 506de4bb3d
Define component interfaces based on consumers (1/2) (#2423)
* Specify interfaces used by appservice, do half of clientapi

* convert more deps of clientapi to finer-grained interfaces

* Convert mediaapi and rest of clientapi

* Somehow this got missed
2022-05-05 13:17:38 +01:00
Neil Alexander d9e71b93b6
Use gomatrixserverlib.Client instead of http.Client (#2421)
* Update to matrix-org/gomatrixserverlib#303

* Use `gomatrixserverlib.Client` for phone-home stats

* Use `gomatrixserverlib.Client` for push notifications

* Use `gomatrixserverlib.Client` for appservices

* Use `gomatrixserverlib.Client` for three-PID invites
2022-05-05 11:33:16 +01:00
kegsay d86dcbef66
syncapi: define specific interfaces for internal HTTP communications (#2416)
* syncapi: use finer-grained interfaces when making the syncapi

* Use specific interfaces for syncapi-roomserver interactions

* Define query access token api for shared http auth code
2022-05-05 09:56:03 +01:00
Neil Alexander 4ad5f9c982
Global database connection pool (for monolith mode) (#2411)
* Allow monolith components to share a single database pool

* Don't yell about missing connection strings

* Rename field

* Setup tweaks

* Fix panic

* Improve configuration checks

* Update config

* Fix lint errors

* Update comments
2022-05-03 16:35:06 +01:00
Neil Alexander 34221938cc
Version 0.8.2 (#2386)
* Version 0.8.2

* Correct account data position mapping

* Try that again

* Don't duplicate wait-for-shutdowns
2022-04-27 16:04:11 +01:00
Neil Alexander 7e745665a4
Change pushkey_ts to be seconds (fix #2354) (#2358) 2022-04-19 09:51:02 +01:00