- Apr 22, 2020
-
-
Richard van der Hoff authored
I messed this up last time I tried (#7239 / e13c6c7a).
-
Richard van der Hoff authored
First some background: StreamChangeCache is used to keep track of what "entities" have changed since a given stream ID. So for example, we might use it to keep track of when the last to-device message for a given user was received [1], and hence whether we need to pull any to-device messages from the database on a sync [2]. Now, it turns out that StreamChangeCache didn't support more than one thing being changed at a given stream_id (this was part of the problem with #7206). However, it's entirely valid to send to-device messages to more than one user at a time. As it turns out, this did in fact work, because *some* methods of StreamChangeCache coped ok with having multiple things changing on the same stream ID, and it seems we never actually use the methods which don't work on the stream change caches where we allow multiple changes at the same stream ID. But that feels horribly fragile, hence: let's update StreamChangeCache to properly support this, and add some typing and some more tests while we're at it. [1]: https://github.com/matrix-org/synapse/blob/release-v1.12.3/synapse/storage/data_stores/main/deviceinbox.py#L301 [2]: https://github.com/matrix-org/synapse/blob/release-v1.12.3/synapse/storage/data_stores/main/deviceinbox.py#L47-L51
-
Dirk Klimpel authored
-
Erik Johnston authored
This is configured via the `redis` config options.
-
Patrick Cloke authored
-
- Apr 16, 2020
-
-
Patrick Cloke authored
-
- Apr 15, 2020
-
-
Patrick Cloke authored
-
Andrew Morgan authored
-
- Apr 14, 2020
-
-
Zay11Zay authored
-
- Apr 09, 2020
-
-
Andrew Morgan authored
-
Patrick Cloke authored
-
- Apr 07, 2020
-
-
Richard van der Hoff authored
We seem to have some duplicates, which could do with being cleared out.
-
- Apr 06, 2020
-
-
Erik Johnston authored
The aim here is to move the command handling out of the TCP protocol classes and to also merge the client and server command handling (so that we can reuse them for redis protocol). This PR simply moves the client paths to the new `ReplicationCommandHandler`, a future PR will move the server paths too.
-
- Apr 04, 2020
-
-
Brendan Abolivier authored
Fixes #6815 Before figuring out whether we should alert a user on MAU, we call get_notice_room_for_user to get some info on the existing server notices room for this user. This function, if the room doesn't exist, creates it and invites the user in it. This means that, if we decide later that no server notice is needed, the user gets invited in a room with no message in it. This happens at every restart of the server, since the room ID returned by get_notice_room_for_user is cached. This PR fixes that by moving the inviting bit to a dedicated function, that's only called when the server actually needs to send a notice to the user. A potential issue with this approach is that the room that's created by get_notice_room_for_user doesn't match how that same function looks for an existing room (i.e. it creates a room that doesn't have an invite or a join for the current user in it, so it could lead to a new room being created each time a user syncs), but I'm not sure this is a problem given it's cached until the server restarts, so that function won't run very often. It also renames get_notice_room_for_user into get_or_create_notice_room_for_user to make what it does clearer.
-
- Apr 03, 2020
-
-
Richard van der Hoff authored
This reverts commit 0122ef10.
-
Richard van der Hoff authored
This was incorrectly merged to master. This reverts commit 319c41f5, reversing changes made to 229eb814.
-
Richard van der Hoff authored
Occasionally we could get a federation device list update transaction which looked like: ``` [ {'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D2', 'prev_id': [], 'stream_id': 12, 'deleted': True}}, {'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D1', 'prev_id': [12], 'stream_id': 11, 'deleted': True}}, {'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D3', 'prev_id': [11], 'stream_id': 13, 'deleted': True}} ] ``` Having `stream_ids` which are lower than `prev_ids` looks odd. It might work (I'm not actually sure), but in any case it doesn't seem like a reasonable thing to expect other implementations to support.
-
- Apr 01, 2020
-
-
Patrick Cloke authored
-
- Mar 31, 2020
-
-
Richard van der Hoff authored
returning a None or an int that we don't use is confusing.
-
Richard van der Hoff authored
This mostly just reduces the amount of "running from sentinel context" spam during unittest setup.
-
Richard van der Hoff authored
(Almost) everywhere that uses it is happy with an awaitable.
-
Richard van der Hoff authored
This was only used in a unit test, so let's just inline it in the test.
-
- Mar 30, 2020
-
-
Richard van der Hoff authored
make sure we clear out all but one update for the user
-
- Mar 27, 2020
-
-
Richard van der Hoff authored
That fallback sets the redirect URL to itself (so it can process the login token then return gracefully to the client). This would make it pointless to ask the user for confirmation, since the URL the confirmation page would be showing wouldn't be the client's.
-
Dirk Klimpel authored
-
Dirk Klimpel authored
-
Richard van der Hoff authored
-
- Mar 26, 2020
-
-
Brendan Abolivier authored
-
Brendan Abolivier authored
-
Dirk Klimpel authored
-
Patrick Cloke authored
-
- Mar 25, 2020
-
-
Erik Johnston authored
This changes the replication protocol so that the server does not send down `RDATA` for rows that happened before the client connected. Instead, the server will send a `POSITION` and clients then query the database (or master out of band) to get up to date.
-
- Mar 24, 2020
-
-
Richard van der Hoff authored
this is never set to anything other than "test", and is a source of unnecessary boilerplate.
-
Richard van der Hoff authored
* Pull Sentinel out of LoggingContext ... and drop a few unnecessary references to it * Factor out LoggingContext.current_context move `current_context` and `set_context` out to top-level functions. Mostly this means that I can more easily trace what's actually referring to LoggingContext, but I think it's generally neater. * move copy-to-parent into `stop` this really just makes `start` and `stop` more symetric. It also means that it behaves correctly if you manually `set_log_context` rather than using the context manager. * Replace `LoggingContext.alive` with `finished` Turn `alive` into `finished` and make it a bit better defined.
-
- Mar 23, 2020
-
-
Richard van der Hoff authored
This just helps keep the rows closer to their streams, so that it's easier to see what the format of each stream is.
-
- Mar 20, 2020
-
-
Richard van der Hoff authored
Attempts to clarify the sample config for databases, and add some stuff about tcp keepalives to `postgres.md`.
-
- Mar 18, 2020
-
-
Erik Johnston authored
It was originally implemented by pulling the full auth chain of all state sets out of the database and doing set comparison. However, that can take a lot work if the state and auth chains are large. Instead, lets try and fetch the auth chains at the same time and calculate the difference on the fly, allowing us to bail early if all the auth chains converge. Assuming that the auth chains do converge more often than not, this should improve performance. Hopefully.
-
- Mar 17, 2020
-
-
Richard van der Hoff authored
Extends #5794 etc to the SimpleHttpClient so that it also applies to non-federation requests. Fixes #7092.
-
Patrick Cloke authored
-
Richard van der Hoff authored
This reverts commit 54dd2862, reversing changes made to 6640460d.
-