Benjamin Lee
50d5e43e6c
implement top-level (not_)rooms filter on /sync
...
These are the fields at filter.room.{rooms,not_rooms}, that apply to all
categories. The category-specific room filters are in
filter.room.{state,timeline,ephemeral}.{rooms,not_rooms}.
2024-05-03 17:30:04 -07:00
Benjamin Lee
590cb05be0
implement types and not_types filters on /message
...
One thing I'm a little worried about with this implementation is that
it's possible for some wildcard expressions to result in a
regex::Error::CompiledTooBig error. It seems like rejecting patterns that
would result in a ReDOS is a good idea, but the matrix spec doesn't say
anything about it.
2024-05-02 19:21:20 -07:00
Benjamin Lee
fa8d4ebe96
implement senders and not_senders filters on /messages
2024-05-02 19:21:20 -07:00
Benjamin Lee
a11550cdf1
move contains_url_filter helper to utils::filter
...
The plan is to move all of the per-event checks into the
pdu_event_allowed function.
2024-05-02 19:21:19 -07:00
Benjamin Lee
ecb0a55511
respect filter.limit in the /messages endpoint
...
As far as I can tell, 'filter.limit' and the 'limit' query parameter are
completely redundant.
2024-05-02 19:21:19 -07:00
Benjamin Lee
296b777c04
implement rooms and not_rooms filters on /message
...
I really doubt anybody is sending /message requests with a filter that
rejects the entire request, but it's the first step in the filter
implementation.
2024-05-02 19:21:07 -07:00
Benjamin Lee
5e50c2803b
add config option tracing_flame_output_path
...
Hardcoding the output path to something in CWD is a pain if you're running
conduwuit through systemd or similar. Also made the error message when
it's unable to create the output file a little more friendly.
2024-04-27 14:33:13 -04:00
Benjamin Lee
1621048199
flush tracing-flame output file on exit
...
Previously we were dropping the flush guard early, possibly causing
samples to be lost on exit.
2024-04-27 14:33:13 -04:00
Benjamin Lee
88725c479e
add tracing_flame_filter config option
...
The previous hardcoded filter `trace,h2=off` isn't appropriate in all
cases, it's better to have this be configurable.
2024-04-27 14:33:13 -04:00
Benjamin Lee
c3202258c5
keep stdout logs when tracing-flame/jaeger is enabled
...
Previously, enabling the `tracing_flame` or `allow_jaeger` options would
prevent any logs from being written to stdout. In addition, enabling the
`allow_jaeger` option would inhibit the `tracing_flame` option.
Now that we have a way to use separate tracing filters with different
layers, we can enable all three at the same time without issues.
This commit also prevents the `debug log_level` command from modifying
the `tracing-flame` filter. This was supported previously, but I don't
think it's something that you would ever want to do intentionally. Now
that we have both the normal log filter and the `tracing-flame` filter
enabled at the same time, we want to `debug log_level` to only modify the
normal filter.
2024-04-27 14:33:13 -04:00
strawberry
09f83367be
lints
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-27 01:16:41 -04:00
strawberry
66827125c8
admin command to get rooms a remote user is in, remove unnecessary dedupe+sort
...
imagine this SQL query but in conduwuit:
select * from users_in_public_rooms where user_id like '%user_id%';
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-27 01:06:43 -04:00
strawberry
6728c5fcb5
admin debug command to fetch a server's true destination
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 23:36:23 -04:00
Jason Volk
4730886f82
increase default dns cache entries
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 20:54:59 -04:00
Jason Volk
88a9650bdb
decrease log verbosity for potentially cached NoRecordsFound
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 20:54:54 -04:00
Jason Volk
65c581d94d
fix inherited sequential small options
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 20:54:03 -04:00
strawberry
b43edc7de1
raise dns_min_ttl_nxdomain back to 3 days
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 18:06:35 -04:00
strawberry
5e145ac86e
add remaining other rocksdb compression options
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 17:23:41 -04:00
strawberry
a18cf2fd6a
never allow only 1 tokio worker or rocksdb parallelism thread (max compare)
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 16:55:37 -04:00
Benjamin Lee
7c503d3203
add optional support for tokio-console
...
This turned out to be quite hairy, mostly because we need to apply the
config's log level filter to the actual logs (stdout and, optionally
sentry), but do not want to filter out the tokio tracing events needed by
the console_subscriber. I hit several edge cases in tracing getting
this to work, and we now depend on a git version of tracing with a
backported patch :(
2024-04-26 14:49:01 -04:00
Jason Volk
66e3e95b78
use logical core count for rocksdb parallelism
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
33afd60026
use number of logical cores for tokio worker thread count
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
54eb634588
add rocksdb compaction thread priority/iopriority w/ conf
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
strawberry
1da3048bb8
allow accepting CONDUWUIT_ prefixed config options
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
c87ea1dea1
delete unused servername_ratelimiter semaphore now
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
d55015ccda
rename release_log_level dev feature to dev_release_log_level, some rebranding
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
Jason Volk
67f9553790
backoff to valhalla
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
255bcf5243
split sending from mod interface.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
a124122dd4
daily logging improvements
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
0b33eec1c2
remove max_concurrent_requests sender hazard
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
00ce43d739
remove redundant timers
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
b01d25277d
fix remote media error propagation
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
b3984f5337
deduplicate cache control into constant
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
7e5ed199c9
deduplicate media handler bodies; minor reorg
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
strawberry
a81563244f
restricted room join typo
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
Jason Volk
49e453fe07
cleanup/refactor sender base loop
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
d19573c7b5
Revert "Revert "prevent empty transactions from going out""
...
This reverts commit bb43351658 .
2024-04-26 02:03:40 -04:00
strawberry
c57601a4b8
delete all active requests for the appservice when we delete it
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
dc35d06c0a
misc changes
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
c915f3dec5
resolve rust 1.75 error?
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
bd73103713
adjust appservice sending logging
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
eb5dcf08c6
remove unnecessary appservice reqwest timeout, reduce couple unwraps, return if unsuccessful HTTP response
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
46ce15f61f
slightly adjust pusher logging, return if non-successful status instead of continuing
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
ee07e3e975
missing semicolon
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
Jason Volk
15a990dc25
improve various logging
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
57e6af6e21
split sending/send base functions
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
f919fa879b
abbrev destination in sender
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
strawberry
d91f24d841
partially revert this in main.rs
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
Jason Volk
e90ab8ec8e
split request base result handling and tweak logging
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
aef77bd338
add release_log_level feature to simulate release logs in debug mode.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00