- May 06, 2020
-
-
Andrew Morgan authored
-
- May 05, 2020
-
-
Erik Johnston authored
This caused `prev_state_ids` to be incorrect if the state event was not replacing an existing state entry.
-
- May 01, 2020
-
-
Patrick Cloke authored
-
Erik Johnston authored
For in memory streams when fetching updates on workers we need to query the source of the stream, which currently is hard coded to be master. This PR threads through the source instance we received via `POSITION` through to the update function in each stream, which can then be passed to the replication client for in memory streams.
-
Erik Johnston authored
We move the processing of typing and federation replication traffic into their handlers so that `Stream.current_token()` points to a valid token. This allows us to remove `get_streams_to_replicate()` and `stream_positions()`.
-
Andrew Morgan authored
-
- Apr 30, 2020
-
-
Patrick Cloke authored
By persisting the user interactive authentication sessions to the database, this fixes situations where a user hits different works throughout their auth session and also allows sessions to persist through restarts of Synapse.
-
- Apr 29, 2020
-
-
Erik Johnston authored
This is primarily for allowing us to send those commands from workers, but for now simply allows us to ignore echoed RDATA/POSITION commands that we sent (we get echoes of sent commands when using redis). Currently we log a WARNING on the master process every time we receive an echoed RDATA.
-
Erik Johnston authored
For direct TCP connections we need the master to relay REMOTE_SERVER_UP commands to the other connections so that all instances get notified about it. The old implementation just relayed to all connections, assuming that sending back to the original sender of the command was safe. This is not true for redis, where commands sent get echoed back to the sender, which was causing master to effectively infinite loop sending and then re-receiving REMOTE_SERVER_UP commands that it sent. The fix is to ensure that we only relay to *other* connections and not to the connection we received the notification from. Fixes #7334.
-
Richard van der Hoff authored
* Factor out functions for injecting events into database I want to add some more flexibility to the tools for injecting events into the database, and I don't want to clutter up HomeserverTestCase with them, so let's factor them out to a new file. * Rework TestReplicationDataHandler This wasn't very easy to work with: the mock wrapping was largely superfluous, and it's useful to be able to inspect the received rows, and clear out the received list. * Fix AssertionErrors being thrown by EventsStream Part of the problem was that there was an off-by-one error in the assertion, but also the limit logic was too simple. Fix it all up and add some tests.
-
- Apr 28, 2020
-
-
Manuel Stahl authored
Signed-off-by:
Manuel Stahl <manuel.stahl@awesome-technologies.de>
-
Erik Johnston authored
Specifically some tests for the typing stream, which means we test streams that fetch missing updates via HTTP (rather than via the DB). We also shuffle things around a bit so that we create two separate `HomeServer` objects, rather than trying to insert a slaved store into places. Note: `test_typing.py` is heavily inspired by `test_receipts.py`
-
Richard van der Hoff authored
When running the UTs against a postgres deatbase, we need to set the collation correctly.
-
- Apr 23, 2020
-
-
Brendan Abolivier authored
This reverts commit 1adf6a55.
-
Brendan Abolivier authored
This reverts commit 6f431936, reversing changes made to 0d775fcc.
-
- Apr 22, 2020
-
-
Brendan Abolivier authored
Adds a request_token_inhibit_errors configuration flag (disabled by default) which, if enabled, change the behaviour of all /requestToken endpoints so that they return a 200 and a fake sid if the 3PID was/was not found associated with an account (depending on the endpoint), instead of an error. Co-Authored-By:
Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
-
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.
-