Commit graph

2480 commits

Author SHA1 Message Date
Till d5876abbe9
Fulltext implementation incl. config (#2480)
This adds the main component of the fulltext search.
This PR doesn't do anything yet, besides creating an empty fulltextindex
folder if enabled. Indexing events is done in a separate PR.
2022-09-07 18:15:54 +02:00
Neil Alexander 31f4ae8997
Use a single context instead 2022-09-07 16:24:43 +01:00
Neil Alexander 5014b35bd7
Update state reset capture to Sentry 2022-09-07 16:23:22 +01:00
Till 0d697f6754
Add HTTP status code to FederationClientError (#2699)
Also ensures we wait on more HTTP status codes.
2022-09-07 16:14:09 +02:00
Till 7e8c605f98
Avoid unneeded JSON operations (#2698)
We were `json.Unmarshal`ing the EDU and `json.Marshal`ing right before
sending the EDU to the stream. Those are now removed and the consumer
does `json.Unmarshal` once.
2022-09-07 12:16:04 +02:00
Till Faelligen 4e352390b6
Re-add waitTime if we're not blacklisted and no RetryAfter was
specified.
2022-09-07 12:13:02 +02:00
Till 2cfcfddecc
Add a SigningKeyUpdate producer (#2697)
This adds a new stream for signing key updates, this should ensure we
don't lose any updates over federation.
2022-09-07 11:45:12 +02:00
Till 440eb0f3a2
Handle errors differently in the DeviceListUpdater (#2695)
`If a device list update goes missing, the server resyncs on the next
one` was failing because a previous test would receive a `waitTime` of
1h, resulting in the test timing out.
This now tries to handle the returned errors differently, e.g. by using
the default `waitTime` of 2s. Also doesn't try further users in the
list, if one of the errors would cause a longer `waitTime`.
2022-09-07 11:44:27 +02:00
Neil Alexander 847032df36
Update to matrix-org/gomatrixserverlib@637a173 2022-09-07 09:11:36 +01:00
Neil Alexander 489ccc1c60
Stronger default power levels 2022-09-06 17:25:17 +01:00
Neil Alexander 70cd9a902c
State resolution fixes in applyAndAuthEvent (update to matrix-org/gomatrixserverlib#336) 2022-09-06 17:19:21 +01:00
Neil Alexander fd7661f69c
Tweak Sentry again 2022-09-05 17:37:17 +01:00
Neil Alexander 5992b4c7ed
Set Sentry user where known 2022-09-05 17:35:43 +01:00
Neil Alexander cd22ba22b0
Improve Sentry reporting 2022-09-05 17:25:11 +01:00
Neil Alexander ecee5f10f4
Tweak logging for detected state resets 2022-09-05 17:08:54 +01:00
Neil Alexander bea3dbe77b
State and auth tweaks (update to matrix-org/gomatrixserverlib#335) 2022-09-05 17:00:54 +01:00
Neil Alexander 1c1d09abd4
Optimise resolve-state tool 2022-09-05 14:17:04 +01:00
Neil Alexander d1f87e63f1
Move SetLatestEvents call 2022-09-05 13:16:14 +01:00
Brian Meek 64e3b76353 Merge commit 'cf5282d83e1a9a8674371ccbd476c317b37edef5' 2022-09-03 09:46:51 -07:00
Brian Meek cf5282d83e
Update ReadAll to use non-deprecated version
Signed-off-by: Brian Meek <brian@hntlabs.com>
2022-09-03 09:46:44 -07:00
Brian Meek 1a917db361 Merge commit 'd13085792c744c06f697fca064e69beb11d87bf9' 2022-09-03 09:04:48 -07:00
Brian Meek d13085792c Update golint and go versions
Signed-off-by: Brian Meek <brian@hntlabs.com>
2022-09-03 09:04:35 -07:00
Brian Meek bc792d832a Merge commit 'e228441e603427d136efc210eb441bbf0a4dded9' 2022-09-02 23:10:30 -07:00
Brian Meek e228441e60
Merge branch 'matrix-org:main' into main 2022-09-02 23:10:09 -07:00
Brian Meek a3c5174598 Merge commit '60f6e4630fbfed90f0b7e2bbc2873dc646d991d6' 2022-09-02 15:22:59 -07:00
Brian Meek 60f6e4630f
Fix mispelling in comment
Signed-off-by: Brian Meek <brian@hntlabs.com>
2022-09-02 15:15:10 -07:00
Brian Meek d3cd37a792
Add a delay before finishing the loadAndRunTests and destroying the dendrite docker container
Signed-off-by: Brian Meek <brian@hntlabs.com>
2022-09-02 15:05:15 -07:00
Brian Meek b04b637d66
Log events as string that are found when the dendrite-upgrade-tests fail to aid debugging
Signed-off-by: Brian Meek <brian@hntlabs.com>
2022-09-02 14:41:45 -07:00
Brian Meek e1ce3f0458
Log events that are found when the dendrite-upgrade-tests fail to aid debugging
Signed-off-by: Brian Meek <brian@hntlabs.com>
2022-09-02 14:03:47 -07:00
Brian Meek 973f949304
Update dependencies to see if it helps make tests more reliable, easier to debug
Signed-off-by: Brian Meek <brian@hntlabs.com>
2022-09-02 12:45:43 -07:00
Till 350a5e5393
Only send (invite) events to the AS if it's interested in it (#2692)
This should hopefully fix #2691 (and maybe also #2690)
2022-09-02 16:03:33 +02:00
Brian Meek 93740cde74 Merge commit '3546cde53dda3e062bd5196d0500fd76bdfd43ce' 2022-09-01 15:48:21 -07:00
Brian Meek 3546cde53d
Merge matrix main
Signed-off-by: Brian Meek <brian@hntlabs.com>
2022-09-01 15:47:55 -07:00
Neil Alexander fea869b41f
Update P2P demos 2022-09-01 17:12:27 +01:00
Neil Alexander 304acd7adc
Version 0.9.6 (#2689)
Changelog and version bump.
2022-09-01 14:49:42 +01:00
Neil Alexander 51d229b025
Configuration tweaks (#2567)
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-01 14:15:41 +01:00
Neil Alexander ad6b902b84
Refactor appservices component (#2687)
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-09-01 09:20:40 +01:00
Brian Meek def05c0ff5 Merge upstream dendrite changes
Signed-off-by: Brian Meek <brian@hntlabs.com>
2022-08-31 13:59:17 -07:00
Brian Meek b6e13d7f94
Merge branch 'matrix-org:main' into main 2022-08-31 10:43:39 -07:00
Neil Alexander 175f65407a
Allow batching in JetStreamConsumer (#2686)
This allows us to receive more than one message from NATS at a time if we want.
2022-08-31 12:21:56 +01:00
Neil Alexander ba0b3adab4
Pinecone standalone refactoring (#2685)
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-31 10:41:32 +01:00
Brian Meek 4906127528
Merge branch 'matrix-org:main' into main 2022-08-30 13:02:17 -07:00
Neil Alexander 02ec00b1bb
Check for "creator" field in m.room.create during event auth (update to matrix-org/gomatrixserverlib@c71e518) 2022-08-30 17:40:46 +01:00
PiotrKozimor 2be43560ca
Index on syncapi_send_to_device table (#2684)
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-30 14:47:54 +01:00
Till 93a6e2f4d3
Set the notification count when sending push notifications (#2683) 2022-08-30 14:54:57 +02:00
Till 7313f56f44
Use existing limit instead of default limit when lazy loading members (#2682)
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-30 14:18:47 +02:00
Till b0e2ea0f37
Fix race condition on startup (#2679)
`SetupAndServeHTTP` would race in `configureHTTPErrors` and while configuring routes.
2022-08-30 13:59:13 +02:00
Neil Alexander bbb3ade4a2
Fix the Cat Overflow bug (update to matrix-org/gomatrixserverlib@2020bdc) 2022-08-30 11:44:26 +01:00
Till Faelligen 21ef487ff8
Log roomserver error 2022-08-29 14:18:33 +02:00
Brian Meek 704cc5c9f5
Race in keyserver intialization (#2619)
Signed-off-by: Brian Meek <brian@hntlabs.com>
2022-08-29 09:10:42 +02:00