aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-21Update monolith-sample.conf (#2087)FORCHA
* Update monolith-sample.conf -Replaced undefined monolith value with server_name (my.hostname.com) value in reference tho ths issue https://github.com/matrix-org/dendrite/issues/2078 * Update monolith-sample.conf Changed IP to location of monolith server Co-authored-by: kegsay <kegan@matrix.org>
2022-01-21Fix #2027 by gracefully handling stub rooms (#2100)kegsay
The server ACL code on startup will grab all known rooms from the rooms_table and then call `GetStateEvent` with each found room ID to find the server ACL event. This can fail for stub rooms, which will be present in the rooms table. Previously this would result in an error being returned and the server failing to start (!). Now we just return no event for stub rooms.
2022-01-21Remodel how device list change IDs are created (#2098)kegsay
* Remodel how device list change IDs are created Previously we made them using the offset Kafka supplied. We don't run Kafka anymore, so now we make the SQL table assign the change ID via an AUTOINCREMENTing ID. Redesign the `keyserver_key_changes` table to have `UNIQUE(user_id)` so we don't accumulate key changes forevermore, we now have at most 1 row per user which contains the highest change ID. This needs a SQL migration. * Ensure we bump the change ID on sqlite * Actually read the DeviceChangeID not the Offset in synapi * Add SQL migrations * Prepare after migration; fixup dendrite-upgrade-test logging * Use higher version numbers; fix sqlite query to increment better * Default 0 on postgres * fixup postgres migration on fresh dendrite instances
2022-01-20BREAKING: Remove Partitioned Stream Positions (#2096)kegsay
* go mod tidy * Break complement to check it fails CI * Remove partitioned stream positions This was used by the device list stream position. The device list position now corresponds to the `Offset`, and the partition is always 0, in prep for removing reliance on Kafka topics for device list changes. * Linting * Migrate old style tokens to new style because element-web doesn't soft-logoout on 4xx errors on /sync
2022-01-07NATS JetStream tweaks (#2086)Neil Alexander
* Use named NATS durable consumers * Build fixes * Remove dupe call to SetFederationAPI * Use namespaced consumer name * Fix namespacing * Fix unit tests hopefully
2022-01-07Fix panic at startup if roomserver was not given federation API reference by ↵Neil Alexander
the time NATS consumes an event, tweak backpressure metrics
2022-01-06Fix #2084 - incorrect /event_auth response (#2085)kegsay
* Fix #2084 * Return early * Linting
2022-01-05Add NATS JetStream support (#1866)S7evinK
* Add NATS JetStream support Update shopify/sarama * Fix addresses * Don't change Addresses in Defaults * Update saramajetstream * Add missing error check Keep typing events for at least one minute * Use all configured NATS addresses * Update saramajetstream * Try setting up with NATS * Make sure NATS uses own persistent directory (TODO: make this configurable) * Update go.mod/go.sum * Jetstream package * Various other refactoring * Build fixes * Config tweaks, make random jetstream storage path for CI * Disable interest policies * Try to sane default on jetstream base path * Try to use in-memory for CI * Restore storage/retention * Update nats.go dependency * Adapt changes to config * Remove unneeded TopicFor * Dep update * Revert "Remove unneeded TopicFor" This reverts commit f5a4e4a339b6f94ec215778dca22204adaa893d1. * Revert changes made to streams * Fix build problems * Update nats-server * Update go.mod/go.sum * Roomserver input API queuing using NATS * Fix topic naming * Prometheus metrics * More refactoring to remove saramajetstream * Add missing topic * Don't try to populate map that doesn't exist * Roomserver output topic * Update go.mod/go.sum * Message acknowledgements * Ack tweaks * Try to resume transaction re-sends * Try to resume transaction re-sends * Update to matrix-org/gomatrixserverlib@91dadfb * Remove internal.PartitionStorer from components that don't consume keychanges * Try to reduce re-allocations a bit in resolveConflictsV2 * Tweak delivery options on RS input * Publish send-to-device messages into correct JetStream subject * Async and sync roomserver input * Update dendrite-config.yaml * Remove roomserver tests for now (they need rewriting) * Remove roomserver test again (was merged back in) * Update documentation * Docker updates * More Docker updates * Update Docker readme again * Fix lint issues * Send final event in `processEvent` synchronously (since this might stop Sytest from being so upset) * Don't report event rejection errors via `/send`, since apparently this is upsetting tests that don't expect that * Go 1.16 instead of Go 1.13 for upgrade tests and Complement * Revert "Don't report event rejection errors via `/send`, since apparently this is upsetting tests that don't expect that" This reverts commit 368675283fc44501f227639811bdb16dd5deef8c. * Don't report any errors on `/send` to see what fun that creates * Fix panics on closed channel sends * Enforce state key matches sender * Do the same for leave * Various tweaks to make tests happier Squashed commit of the following: commit 13f9028e7a63662759ce7c55504a9d2423058668 Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Tue Jan 4 15:47:14 2022 +0000 Do the same for leave commit e6be7f05c349fafbdddfe818337a17a60c867be1 Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Tue Jan 4 15:33:42 2022 +0000 Enforce state key matches sender commit 85ede6d64bf10ce9b91cdd6d80f87350ee55242f Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Tue Jan 4 14:07:04 2022 +0000 Fix panics on closed channel sends commit 9755494a98bed62450f8001d8128e40481d27e15 Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Tue Jan 4 13:38:22 2022 +0000 Don't report any errors on `/send` to see what fun that creates commit 3bb4f87b5dd56882febb4db5621db484c8789b7c Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Tue Jan 4 13:00:26 2022 +0000 Revert "Don't report event rejection errors via `/send`, since apparently this is upsetting tests that don't expect that" This reverts commit 368675283fc44501f227639811bdb16dd5deef8c. commit fe2673ed7be9559eaca134424e403a4faca100b0 Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Tue Jan 4 12:09:34 2022 +0000 Go 1.16 instead of Go 1.13 for upgrade tests and Complement commit 368675283fc44501f227639811bdb16dd5deef8c Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Tue Jan 4 11:51:45 2022 +0000 Don't report event rejection errors via `/send`, since apparently this is upsetting tests that don't expect that commit b028dfc08577bcf52e6cb498026e15fa5d46d07c Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Tue Jan 4 10:29:08 2022 +0000 Send final event in `processEvent` synchronously (since this might stop Sytest from being so upset) * Merge in NATS Server v2.6.6 and nats.go v1.13 into the in-process connection fork * Add `jetstream.WithJetStreamMessage` to make ack/nak-ing less messy, use process context in consumers * Fix consumer component name in federation API * Add comment explaining where streams are defined * Tweaks to roomserver input with comments * Finish that sentence that I apparently forgot to finish in INSTALL.md * Bump version number of config to 2 * Add comments around asynchronous sends to roomserver in processEventWithMissingState * More useful error message when the config version does not match * Set version in generate-config * Fix version in config.Defaults Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2021-12-20Use non http API as fsAPI to avoid network requests (#2075)S7evinK
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
2021-12-20Allow partial test runs (#2076)S7evinK
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
2021-12-16Added std type to logging config. (#2060)Martin Ashby
* Added std type to logging level. Added demux-ing of logging to stdout/err working around https://github.com/sirupsen/logrus/issues/403 Turned off the default logging in favour of using hooks always. Added fallback, if no stdout/err logger was configured, add one automatically. This prevents unexpected lack of logging after an upgrade in case the user's configuration file is not updated. Fixes: https://github.com/matrix-org/dendrite/issues/2054 Signed-off-by: Martin Ashby <martin@ashbysoft.com> * Fix build on Windows - revert function rename SetupHookLogging Fixes https://github.com/matrix-org/dendrite/pull/2060/files#r761692681 * Revert logging formatter changes to log.go, base.go. The same formatting should be applied on both windows and unix, so it makes sense to keep it in files which are shared between both platforms. Fixes https://github.com/matrix-org/dendrite/pull/2060#discussion_r762557679 * Remove unnecessary startup logging about info level logger. Fixes https://github.com/matrix-org/dendrite/pull/2060#discussion_r763959474 Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2021-12-13Fix build errorNeil Alexander
2021-12-13Update to matrix-org/pinecone@aa2808dNeil Alexander
2021-12-13Fix keyring regressions in previous P2P demoNeil Alexander
2021-12-09Return event NID from `StoreEvent`, match PSQL vs SQLite behaviour, tweak ↵Neil Alexander
backfill persistence (#2071)
2021-12-09Set @matrix-org/dendrite-core as repository code ownerNeil Alexander
2021-12-03Cherry-pick removal of unused HTTP client from #2061Neil Alexander
Co-authored-by: Tommie Gannert <tommie@gannert.se>
2021-12-03Cherry-pick typing fix from #2061Neil Alexander
Co-authored-by: Tommie Gannert <tommie@gannert.se>
2021-12-03Add missing HTTP mode for userapi (#1982)S7evinK
* Add missing internal api endpoint Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Add missing performKeyBackup endpoint * Add missing http mode for userapi * Fix failing tests * Add error checks * Fix sytest * Update startup logic for HTTP mode * Use userImpl for AS (annoying) * Don't send device list updates for appservice devices * Fix build Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2021-12-03Add missing internal routes (#2064)S7evinK
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
2021-12-03Squash username to lowercase at login (#2065)nymori
Signed-off-by: Bernard Zhao <bernard.zhao.us@gmail.com>
2021-11-29Updating example to Postgres v14 (#2062)Ben Yanke
See issue #2052
2021-11-25Fixes for multiple Pinecone peersNeil Alexander
2021-11-25Fix P2P demo buildsNeil Alexander
2021-11-25Update to matrix-org/pinecone@0cc483bNeil Alexander
2021-11-25Support connecting to multiple Pinecone static peers in the P2P demos ↵Neil Alexander
(supply a comma-separated list)
2021-11-24Ratelimit requests to /media/r0/download|upload (#2020)S7evinK
* Add /media/r0/config handler Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Add rate limiting to media api * Rename variable * Add passing tests * Don't send multiple headers Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2021-11-24Don't let things added to the media_store/ directory find their way into the ↵The Stranjer
repo (#2057)
2021-11-24Don't populate config defaults where it doesn't make sense (#2058)Neil Alexander
* Don't populate config defaults where it doesn't make sense * Fix dendritejs builds
2021-11-24Merge `federationapi`, `federationsender`, `signingkeyserver` components (#2055)Neil Alexander
* Initial federation sender -> federation API refactoring * Move base into own package, avoids import cycle * Fix build errors * Fix tests * Add signing key server tables * Try to fold signing key server into federation API * Fix dendritejs builds * Update embedded interfaces * Fix panic, fix lint error * Update configs, docker * Rename some things * Reuse same keyring on the implementing side * Fix federation tests, `NewBaseDendrite` can accept freeform options * Fix build * Update create_db, configs * Name tables back * Don't rename federationsender consumer for now
2021-11-22Don't persist transaction IDs in the roomserver (#2048)Neil Alexander
2021-11-18Only return non-stub rooms from `GetKnownRooms` (#2049)Neil Alexander
* Only return non-stub rooms from `GetKnownRooms` This should stop a bunch of errors at startup with invalid server ACLs. * Fix query
2021-11-16Version 0.5.1 (#2047)v0.5.1Neil Alexander
* Version bump, changelog * Update to matrix-org/pinecone@8c7a1ad * Update to matrix-org/pinecone@febf350
2021-11-16Guard in all key consumersNeil Alexander
2021-11-16Fix panic in federationsender consumerNeil Alexander
2021-11-15Mark room versions 8 and 9 as unstable (update to ↵Neil Alexander
matrix-org/gomatrixserverlib@15a64d2)
2021-11-12Fix default power levels (update to matrix-org/gomatrixserverlib@af2616b)Neil Alexander
2021-11-08Fix sytestNeil Alexander
2021-11-08Update to matrix-org/gomatrixserverlib@ed70208 (hopefully will fix sytest)Neil Alexander
2021-11-08Update sytest-whitelistNeil Alexander
2021-11-08Resume federation sends (#2039)Neil Alexander
* Resume federation sends * Review comments * Fix build error
2021-11-04Try to reduce re-allocations a bit in resolveConflictsV2Neil Alexander
2021-11-04Further state resolution v2 optimisationsNeil Alexander
2021-11-04State resolution v2 performance improvements (reduce allocs in Kahn's ↵Neil Alexander
algorithm, update to matrix-org/gomatrixserverlib@91dadfb)
2021-11-03Reduce CPU usage of SelectStateInRange (#2038)Neil Alexander
2021-11-02Support joining version 8 and 9 rooms (update to ↵Neil Alexander
matrix-org/gomatrixserverlib@13366e7)
2021-11-02Fix building on Windows (#2008)S7evinK
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
2021-11-02Run gofmt on dendrite - apply go 1.17 preferred build tags (#2021)PiotrKozimor
2021-11-02Fix #2028 (#2036)Neil Alexander
2021-11-020️⃣ Media API: Fix maxFileSizeBytes=0 handling (#1993)database64128