- May 26, 2020
-
-
Richard van der Hoff authored
A couple of changes of significance: * remove the `_last_ack < federation_position` condition, so that updates will still be correctly processed after restart * Correctly wire up send_federation_ack to the right class.
-
- May 18, 2020
-
-
Richard van der Hoff authored
-
- May 15, 2020
-
-
Richard van der Hoff authored
Make sure that the AccountDataStream presents complete updates, in the right order. This is much the same fix as #7337 and #7358, but applied to a different stream.
-
- May 13, 2020
-
-
Erik Johnston authored
-
- May 05, 2020
-
-
Richard van der Hoff authored
looks like we managed to break this during the refactorathon.
-
- May 01, 2020
-
-
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()`.
-
- 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
-
-
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`
-
- Apr 22, 2020
-
-
Richard van der Hoff authored
I messed this up last time I tried (#7239 / e13c6c7a).
-
Erik Johnston authored
This is configured via the `redis` config options.
-
- 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.
-
- 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 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 04, 2020
-
-
Richard van der Hoff authored
This is a precursor to giving EventBase objects the knowledge of which room version they belong to.
-
- Feb 07, 2020
-
-
Richard van der Hoff authored
... and use it in places where it's trivial to do so. This will make it easier to pass room versions into the FrozenEvent constructors.
-
- Jan 16, 2020
-
-
Erik Johnston authored
* Port synapse.replication.tcp to async/await * Newsfile * Correctly document type of on_<FOO> functions as async * Don't be overenthusiastic with the asyncing....
-
- Jan 15, 2020
-
-
Erik Johnston authored
Currently we rely on `current_state_events` to figure out what rooms a user was in and their last membership event in there. However, if the server leaves the room then the table may be cleaned up and that information is lost. So lets add a table that separately holds that information.
-
- Dec 18, 2019
-
-
Erik Johnston authored
This encapsulates config for a given database and is the way to get new connections.
-
- Dec 06, 2019
-
-
Erik Johnston authored
-
- Nov 27, 2019
-
-
Amber Brown authored
-
- Oct 23, 2019
-
-
Erik Johnston authored
-
- May 10, 2019
-
-
Amber Brown authored
-
- Apr 02, 2019
-
-
Richard van der Hoff authored
Hopefully this time we really will fix #4422. We need to make sure that the cache on `get_rooms_for_user_with_stream_ordering` is invalidated *before* the SyncHandler is notified for the new events, and we can now do so reliably via the `events` stream.
-
- Mar 27, 2019
-
-
Richard van der Hoff authored
-
- Mar 25, 2019
-
-
Richard van der Hoff authored
Make sure that they are sent correctly over the replication stream. Fixes: #4898
-
- Mar 06, 2019
-
-
Brendan Abolivier authored
This reverts commit d7dbad35.
-
- Mar 05, 2019
-
-
Brendan Abolivier authored
-
Brendan Abolivier authored
* Rate-limiting for registration * Add unit test for registration rate limiting * Add config parameters for rate limiting on auth endpoints * Doc * Fix doc of rate limiting function Co-Authored-By:
babolivier <contact@brendanabolivier.com> * Incorporate review * Fix config parsing * Fix linting errors * Set default config for auth rate limiting * Fix tests * Add changelog * Advance reactor instead of mocked clock * Move parameters to registration specific config and give them more sensible default values * Remove unused config options * Don't mock the rate limiter un MAU tests * Rename _register_with_store into register_with_store * Make CI happy * Remove unused import * Update sample config * Fix ratelimiting test for py2 * Add non-guest test
-
- Nov 02, 2018
-
-
Erik Johnston authored
This is in preparation to refactor FrozenEvent to support different event formats for different room versions
-
- Oct 02, 2018
-
-
Amber Brown authored
-
- Sep 18, 2018
-
-
Richard van der Hoff authored
We want to wait until we have read the response body before we log the request as complete, otherwise a confusing thing happens where the request appears to have completed, but we later fail it. To do this, we factor the salient details of a request out to a separate object, which can then keep track of the txn_id, so that it can be logged.
-
- Sep 03, 2018
-
-
Amber Brown authored
-
- Aug 13, 2018
-
-
Amber Brown authored
-
- Aug 10, 2018
-
-
black authored
-
- Aug 09, 2018
-
-
Erik Johnston authored
-
- Jul 25, 2018
-
-
Richard van der Hoff authored
on_notifier_poke no longer runs synchonously, so we have to do a different hack to make sure that the replication data has been sent. Let's actually listen for its arrival.
-
- Jul 23, 2018
-
-
Erik Johnston authored
-