Charles Hall
346ee5cd81
actually, just copy dump-state
2024-11-02 17:18:27 -07:00
Charles Hall
4e1691fc9d
work around bug in ruma::state_res::resolve
2024-11-02 17:17:13 -07:00
Charles Hall
0b4cc6a1b1
add subcmd to repair some persistent state
...
This version does state resolution from scratch instead of trusting the
caches in the database.
2024-11-02 12:57:54 -07:00
Charles Hall
d42a5ec1f0
avoid overhead when cache sizes are zero
...
Don't even try taking locks, inserting or removing anything, etc.
2024-11-01 14:25:52 -07:00
Charles Hall
1148c6004f
make all caches individually configurable
...
Also:
* Removes the `cache_capacity_modifier` option
* Renames the `pdu_cache_capacity` option to `cache.pdu`
2024-11-01 14:25:52 -07:00
Charles Hall
9fab7538a0
scale roomid_spacechunk_cache by modifier
...
Not scaling this was probably unintentional.
2024-11-01 14:25:52 -07:00
Charles Hall
4083451a10
rename Services constructor
2024-11-01 14:25:52 -07:00
Charles Hall
fefc84e8c7
rename constructor for globals service
2024-11-01 14:25:52 -07:00
Charles Hall
55b605f046
rename constructor for sending service
2024-11-01 14:25:52 -07:00
Charles Hall
4faa8ea37c
rename constructor for admin service
2024-11-01 14:25:52 -07:00
Charles Hall
e06d126d4e
add constructor for users service
2024-11-01 14:25:52 -07:00
Charles Hall
f771d319b2
add constructor for spaces service
...
Also adds a public function to invalidate the cache rather than exposing
the entire cache publicly.
2024-11-01 14:25:52 -07:00
Charles Hall
f702b6cccd
add constructor for state compressor service
2024-11-01 14:25:52 -07:00
Charles Hall
c6e2f8372c
add constructor for state accessor service
2024-11-01 14:25:52 -07:00
Charles Hall
a083ff9200
add constructor for lazy-loading service
2024-11-01 14:25:52 -07:00
Charles Hall
3b28d0cfda
add constructor for typing service
2024-11-01 14:25:52 -07:00
Charles Hall
b18df8de70
rename appservice service constructor
2024-11-01 14:25:52 -07:00
Charles Hall
5be1e20eb4
call maximize_fd_limit at top of main
...
This way we don't shoot ourselves in the foot by forgetting to do it for
other subcommands (e.g. that manipulate the database) in the future.
2024-11-01 13:16:36 -07:00
Andreas Fuchs
9529d43a21
ChangeLog entry for check-config subcmd
2024-11-01 12:16:49 -04:00
Andreas Fuchs
dcf64f03fb
Validate generated config file in the nixos module
...
This uses the usual pkgs.runCommand pattern to ensure that no
non-parseable config files can make it to the command line.
2024-11-01 12:10:01 -04:00
Andreas Fuchs
a02c551a5e
Disallow any unknown fields in configuration files
...
This will break backwards compatibility of configurations, but
ensures that a previously-configured setting won't get dropped
arbitrarily. Pretty much worth it, I think.
2024-11-01 12:09:58 -04:00
Andreas Fuchs
26ba489aa3
Add a "check-config" command to validate config files & tests for it
2024-11-01 12:08:17 -04:00
Lambda
70ee206031
Extract source address for requests
2024-10-25 20:48:38 +00:00
Lambda
3247c64cd8
Add support for HAProxy proxy protocol for listeners
2024-10-25 20:48:38 +00:00
Lambda
99f3e2aecd
Refactor server listener spawning
2024-10-25 20:47:04 +00:00
Charles Hall
86481fd651
make reload_handles optional for creating Services
...
This will be useful for instantiating services in CLI subcommands, which
have different requirements around observeability.
2024-10-25 11:27:11 -07:00
Charles Hall
b03c2a15b3
add observability infrastructure for cli subcmds
2024-10-25 11:27:11 -07:00
K900
b93c39ee93
fix: use non-alias name in nixos module
2024-10-24 14:46:44 +00:00
Charles Hall
ce7efc1eff
move lasttimelinecount_cache to service
2024-10-20 13:29:33 -07:00
Charles Hall
107f4521e0
move appservice_in_room_cache to service
2024-10-20 13:29:33 -07:00
Charles Hall
9d62865b28
move our_real_users_cache to service
2024-10-20 13:29:33 -07:00
Charles Hall
d3b62e598d
move shortstatekey_cache to service
2024-10-20 13:29:33 -07:00
Charles Hall
190b788683
move statekeyshort_cache to service
2024-10-20 13:29:33 -07:00
Charles Hall
2b2b4169df
move eventidshort_cache to service
2024-10-20 13:29:33 -07:00
Charles Hall
095ee483ac
move auth_chain_cache to service
2024-10-20 13:29:33 -07:00
Charles Hall
47502d1f36
move shorteventid_cache to service
2024-10-20 13:29:33 -07:00
Charles Hall
7563360bee
move pdu_cache to service
2024-10-20 13:29:32 -07:00
Charles Hall
fb534d8140
move userdevicesessionid_uiaarequest to service
2024-10-20 13:29:32 -07:00
Charles Hall
a1fe0f3fff
add service type for short
...
This will be necessary in the near future.
2024-10-20 13:29:32 -07:00
Charles Hall
e0cf163486
delete useless admin commands
...
To clear caches, restart the server. We may want to consider adding the
cache sizes and database memory usage as metrics in the future.
2024-10-20 13:29:28 -07:00
Lambda
6a44d0af2b
Fix u8_slice_to_hex()
...
For bytes <0x10, this would omit the leading zero.
2024-10-20 18:50:05 +00:00
Andreas Fuchs
76a633cb66
Log failed remote resident server join requests
2024-10-13 19:26:35 -07:00
Andreas Fuchs
e001356653
Return local join error if all remote joins fail
...
If all join requests to resident servers fail or if the joining server
is the only resident server (i.e. the room is local-only), we would
previously send a 500 error, even if the more correct response would be
M_UNAUTHORIZED (e.g. if the user tries to join an invite-only room).
To fix this, we now return the error generated by attempting the join
locally, which correctly informs the client about why their request
failed.
2024-10-13 19:10:58 -07:00
Charles Hall
5a490a4397
fix mod/use order
...
Yes, it does actually bother me, thanks for asking.
2024-10-03 15:28:24 -07:00
mikoto
287f6b9163
refactor calculate_invite_state
...
That was terribly named and terribly implemented.
Co-authored-by: Charles Hall <charles@computer.surgery>
2024-10-03 10:52:07 -07:00
Lambda
e14b7f28f2
Implement federation self-test
2024-09-27 10:51:32 -07:00
Lambda
6022d56094
Use enums for options to send_request(), add allow_loopback
2024-09-27 10:48:12 -07:00
Lambda
94d523ebcb
Reload TLS config on SIGHUP
2024-09-27 09:51:17 -07:00
Lambda
39880cc6ac
Abstract over sd_notify
2024-09-27 09:50:51 -07:00
Charles Hall
6ab87f97dd
include traceresponse header if possible
...
This can help with debugging.
2024-09-26 19:01:15 -07:00