Charles Hall
a86b8f58b0
log duration of the computing of states
2024-11-29 14:12:43 -08:00
Charles Hall
3afa1ccf8a
include graphviz of state and auth events
2024-11-29 14:12:43 -08:00
Charles Hall
052ab6dddd
record pdus and edges in each room's auth chain
...
This changes the output format of the command drastically.
2024-11-29 14:12:43 -08:00
Charles Hall
aa49b111ed
allow selecting a subset of rooms
...
This can make debugging a specific room much easier/faster.
2024-11-29 14:12:39 -08:00
Charles Hall
b1e14fad5c
add option to recompute room state
...
Hopefully we can make use of this state resolution code for more stuff
in the future.
2024-11-29 13:58:32 -08:00
Charles Hall
33598a79b7
add command to get the state of all rooms
2024-11-29 13:58:28 -08:00
Olivia Lee
8fcec6396e
keep going when one deletion fails in delete-remote-media
...
We *should* ensure that media deletion is always successful, but when a
bug causes a single object to fail deletion it's better to try to delete
the remaining objects than to give up entirely.
2024-11-28 18:32:05 -08:00
Olivia Lee
11b5055647
log details of failed media deletion
2024-11-28 18:32:05 -08:00
Olivia Lee
bdb623cb07
add comment explaining that failed media keys are logged
2024-11-28 16:46:54 -08:00
Olivia Lee
ed789e6536
show count of corrupted media keys in delete-remote-media command
2024-11-28 15:55:20 -08:00
Olivia Lee
79bc2525e3
add unit tests for media key parsing
...
We've had at least a couple media key parsing bugs. Let's get a *little*
more confidence that this code works :)
2024-11-27 22:24:54 -08:00
Olivia Lee
103a4fb56b
handle media keys where thumbnail size contains 0xFF
...
Our current code should never write these, because we have an allowlist
of thumbnail sizes. None of the allowed sizes contain a 0xFF byte. We
have observed keys with a 0xFF in the thumbnail size a couple times on
real servers, and believe an early version of conduit wrote these before
the allowlist was added.
These keys were originally handled correctly, and were broken by
e2cba15ed2 . Before that commit, we were
parsing media keys backwards, and never tried to read the thumbnail size
or mxc url.
2024-11-27 22:15:07 -08:00
Charles Hall
51b30d9ba3
largely stop using RoomCreateEventContent
...
This became a problem because #foundation-office:matrix.org has a
malformed create event with its `predecessor` set to a string instead of
a map.
The solution to this is, unfortunately, to do more shotgun parsing to
extract only the desired fields rather than trying to parse the entire
content every time. To prevent this kind of problem from happening
again, `RoomCreateEventContent` must only be used for creating new PDUs,
existing PDUs must be shotgun-parsed.
2024-11-08 20:36:46 -08:00
Charles Hall
9d0cf428a5
stop passing the entire create event around
...
This gets rid of 3 instances of re-parsing the room version.
There's one place where we need the event ID of the room create event to
verify federation responses, so now we just look up the event ID at that
point instead.
2024-11-08 20:36:07 -08:00
Charles Hall
a4e1522875
generalize get_room_version
...
There are other fields of `m.room.create` events that are useful to
individually extract without caring about the values of other fields.
2024-11-08 18:38:16 -08:00
Charles Hall
c9c30fba30
upgrade to latest ruma
2024-11-08 17:26:44 -08:00
Charles Hall
e74c8687f5
drop dependency on once-cell
2024-11-07 11:36:13 -08: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
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
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