aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-05Set Sentry user where knownNeil Alexander
2022-09-05Improve Sentry reportingNeil Alexander
2022-09-05Tweak logging for detected state resetsNeil Alexander
2022-09-05State and auth tweaks (update to matrix-org/gomatrixserverlib#335)Neil Alexander
2022-09-05Optimise `resolve-state` toolNeil Alexander
2022-09-05Move `SetLatestEvents` callNeil Alexander
2022-09-02Only send (invite) events to the AS if it's interested in it (#2692)Till
This should hopefully fix #2691 (and maybe also #2690)
2022-09-01Update P2P demosNeil Alexander
2022-09-01Version 0.9.6 (#2689)v0.9.6Neil Alexander
Changelog and version bump.
2022-09-01Configuration tweaks (#2567)Neil Alexander
This makes the following changes: * The various `Defaults` functions are now responsible for setting sane defaults if `generate` is specified, rather than hiding them in `generate-config` * Some configuration options have been marked as `omitempty` so that they don't appear in generated configs unnecessarily (monolith-specific vs. polylith-specific options) * A new option `-polylith` has been added to `generate-config` to create a config that makes sense for polylith deployments (i.e. including the internal/external API listeners and per-component database sections) * A new option `-normalise` has been added to `generate-config` to take an existing file and add any missing options and/or defaults
2022-09-01Refactor appservices component (#2687)Neil Alexander
This PR refactors the app services component. It makes the following changes: * Each appservice now gets its own NATS JetStream consumer * The appservice database is now removed entirely, since we just use JetStream as a data source instead * The entire component is now much simpler and we deleted lots of lines of code 💅 The result is that it should be much lighter and hopefully much more performant.
2022-08-31Allow batching in `JetStreamConsumer` (#2686)Neil Alexander
This allows us to receive more than one message from NATS at a time if we want.
2022-08-31Pinecone standalone refactoring (#2685)Neil Alexander
This refactors the `dendrite-demo-pinecone` executable so that it: 1. Converts the old `.key` file into a standard `.pem` file 2. Allows passing in the `--config` option to supply a normal Dendrite configuration file, so that you can configure PostgreSQL instead of SQLite, appservices and all the other usual stuff
2022-08-30Check for `"creator"` field in `m.room.create` during event auth (update to ↵Neil Alexander
matrix-org/gomatrixserverlib@c71e518)
2022-08-30Index on `syncapi_send_to_device` table (#2684)PiotrKozimor
Introduced index improves select query performance. Example execution time of `selectSendToDeviceMessagesSQL` query dropped from 80 ms to 15 ms. No sytest modifications are required. ### Pull Request Checklist * [x] I have added added tests for PR _or_ I have justified why this PR doesn't need tests. * [x] Pull request includes a [sign off](https://github.com/matrix-org/dendrite/blob/main/docs/CONTRIBUTING.md#sign-off) Signed-off-by: `Piotr Kozimor <p1996k@gmail.com>`
2022-08-30Set the notification count when sending push notifications (#2683)Till
2022-08-30Use existing limit instead of default limit when lazy loading members (#2682)Till
This should fix an issue where we return less than the expected membership events, when doing an initial sync. When doing an initial sync, the state limit is set to `math.MaxInt32`, while the default filter is set to 20.
2022-08-30Fix race condition on startup (#2679)Till
`SetupAndServeHTTP` would race in `configureHTTPErrors` and while configuring routes.
2022-08-30Fix the Cat Overflow bug (update to matrix-org/gomatrixserverlib@2020bdc)Neil Alexander
2022-08-29Log roomserver errorTill Faelligen
2022-08-29Race in keyserver intialization (#2619)Brian Meek
Signed-off-by: Brian Meek <brian@hntlabs.com>
2022-08-29Default to limit of 20 state eventsTill Faelligen
2022-08-28Enforce `type`, `sender`, `state_key` and `room_id` lengths using codepoints ↵Neil Alexander
rather than bytes (update to matrix-org/gomatrixserverlib@5f66df0, matrix-org/matrix-spec#1001)
2022-08-26Restrict username length properly (#2676)Neil Alexander
This fixes #2674 by fixing the username check to comply with the [spec appendices](https://spec.matrix.org/v1.3/appendices/#user-identifiers): > The length of a user ID, including the @ sigil and the domain, MUST NOT exceed 255 characters.
2022-08-25Version 0.9.5 (#2673)v0.9.5Neil Alexander
Changelog and version bump.
2022-08-25SyncAPI tweaks/fixes (#2671)Till
- Reverts 9dc57122d991d54ea6750448ba88c8763a569830 as it was causing issues https://github.com/matrix-org/dendrite/issues/2660 - Updates the GMSL `DefaultStateFilter` to use a limit of 20 events - Uses the timeline events to determine the new position instead of the state events
2022-08-25Remove a couple unnecessary Sentry captures from backfillNeil Alexander
2022-08-25Tweak logging and Sentry reporting for roomserver inputNeil Alexander
2022-08-25Fix 500s on `/state`, `/state_ids` when state not known (#2672)Neil Alexander
This was due to bad error bubbling.
2022-08-24Allow un-rejecting events on reprocessingNeil Alexander
2022-08-23Only set backOffStarted to false if until is not zero (#2669)Till
2022-08-23Detect `types.MissingStateError` in `CheckServerAllowedToSeeEvent` (#2667)Neil Alexander
This will hopefully stop some 500 errors on `/event` where there is no state-before known.
2022-08-23Complement QoL changes (#2663)Till
This PR does the following: - adds a `keysize` parameter to `generate-keys`, so we can use lower sized keys when running in CI - updates the Complement docker files to use BuildKit (requires Docker >18.09) - uses `exec` when executing `dendrite-monotlith-server`, making it PID 1 inside docker, which results in Dendrite actually receiving the `SIGTERM` signal send by Docker. (Making it faster when running tests with Complement, as we don't take 10 seconds to timeout)
2022-08-23Add timeout parameter & trim URL (#2666)Till
A timeout of 10 seconds could cause issues with servers having a high `bcrypt_cost` configured in the config. This adds a parameter to manually configure the timeout, defaults to 30 seconds.
2022-08-22Tweak soft-failure handling in roomserverNeil Alexander
commit 1929b688e31987c46e0c8a546f0f9cb0a46bf9a3 Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Mon Aug 22 10:09:44 2022 +0100 Still process state-before for soft-failed events commit e83c0b701d40d78b92072c4643f6bc6f71b72800 Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Mon Aug 22 10:06:50 2022 +0100 Improve logging commit 29e26124bc27cb83d449de2a4214b253c594aa93 Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Mon Aug 22 09:58:13 2022 +0100 Don't store soft-failed events as rejected
2022-08-19Fetch more data for newly joined rooms in an incremental sync (#2657)Till
If we've joined a new room in an incremental sync, try fetching more data. This deflakes the complement server notices test (at least in my tests).
2022-08-19Version 0.9.4 (#2658)v0.9.4Neil Alexander
### Fixes * A bug in the roomserver around handling rejected outliers has been fixed * Backfilled events will now use the correct history visibility where possible * The device list updater backoff has been fixed, which should reduce the number of outbound HTTP requests and `Failed to query device keys for some users` log entries for dead servers * The `/sync` endpoint will no longer incorrectly return room entries for retired invites which could cause some rooms to show up in the client "Historical" section * The `/createRoom` endpoint will now correctly populate `is_direct` in invite membership events, which may help clients to classify direct messages correctly * The `create-account` tool will now log an error if the shared secret is not set in the Dendrite config * A couple of minor bugs have been fixed in the membership lazy-loading * Queued EDUs in the federation API are now cached properly
2022-08-19Enforce device list backoffs (#2653)Neil Alexander
This ensures that if the device list updater is already backing off a node, we don't try to call processServer again anyway for server just because the server name arrived in the channel. Otherwise we can keep trying to hit a remote server that is offline or not behaving every second and that spams the logs too.
2022-08-19Set historyVisibility for backfilled events over federation (#2656)Till
This should hopefully deflake Backfill works correctly with history visibility set to joined as we were using the default shared visibility, even if the events are set to joined (or something else)
2022-08-19Make SyncAPI unit tests more reliable (#2655)Till
This should hopefully make some SyncAPI tests more reliable
2022-08-19De-race `TestExpireEDUs` (#2654)Winter
In some conditions (fast CPUs), this test would race the clock for EDU expiration when all we want to make sure of is that the expired EDUs are properly deleted. Given this, we set the expiry time to 0 so the specified EDUs are always deleted when DeleteExpiredEDUs is called. Fixes #2650. Signed-off-by: Winter <winter@winter.cafe>
2022-08-18State handling tweaks (#2652)Neil Alexander
This tweaks how rejected events are handled in room state and also to not apply checks we can't complete to outliers.
2022-08-18Enable `workflow_dispatch` in GHANeil Alexander
2022-08-18Actually store EDUs once we retrieved from the database (#2651)Till
We now actually cache the EDUs once we got them from the database and ensures we only evict them if we successfully deleted them.
2022-08-18Reprocess rejected input events (#2647)Neil Alexander
* Reprocess outliers that were previously rejected * Might as well do all events this way * More useful errors * Fix queries * Tweak condition * Don't wrap errors * Report more useful error * Flatten error on `r.Queryer.QueryStateAfterEvents` * Some more debug logging * Flatten error in `QueryRestrictedJoinAllowed` * Revert "Flatten error in `QueryRestrictedJoinAllowed`" This reverts commit 1238b4184c30e0c31ffb0f364806fa1275aba483. * Tweak `QueryStateAfterEvents` * Handle MissingStateError too * Scope to room * Clean up * Fix the error * Only apply rejection check to outliers
2022-08-18Add a delay after sending events to the roomserverTill Faelligen
2022-08-16Stop spamming the logs with `StateBetween: ignoring deleted state` event IDsNeil Alexander
2022-08-16Lazy-loading fixes (#2646)Neil Alexander
* Use existing current room state if we have it * Don't dedupe before applying the history vis filter * Revert "Don't dedupe before applying the history vis filter" This reverts commit d27c4a0874dabb77c2eda6b23eb7c00478bc9e90. * Revert "Use existing current room state if we have it" This reverts commit 5819b4a7ce511204c4fb48d3c4741612b136e2ea. * Tweaks
2022-08-16Verify a shared secret is set in `create-account` (#2645)Till
2022-08-16Use `is_direct` flag from `/createRoom`, update stripped state (#2644)Neil Alexander
* Use `is_direct` flag from `/createRoom`, update stripped state * Add comment