summary refs log tree commit diff
path: root/synapse/replication/tcp/streams/federation.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Convert all namedtuples to attrs. (#11665)Patrick Cloke2021-12-301-8/+7
| | | To improve type hints throughout the code.
* Use direct references for some configuration variables (#10798)Patrick Cloke2021-09-131-1/+1
| | | | Instead of proxying through the magic getter of the RootConfig object. This should be more performant (and is more explicit).
* Use inline type hints in various other places (in `synapse/`) (#10380)Jonathan de Jong2021-07-151-3/+3
|
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Add type hints for the federation sender. (#9681)Patrick Cloke2021-03-291-3/+11
| | | | Includes an abstract base class which both the FederationSender and the FederationRemoteSendQueue must implement.
* Support any process writing to cache invalidation stream. (#7436)Erik Johnston2020-05-071-3/+9
|
* Fix catchup-on-reconnect for the Federation Stream (#7374)Richard van der Hoff2020-05-051-9/+21
| | | | looks like we managed to break this during the refactorathon.
* Thread through instance name to replication client. (#7369)Erik Johnston2020-05-011-2/+2
| | | 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.
* Improve type checking in `replication.tcp.Stream` (#7291)Richard van der Hoff2020-04-171-8/+11
| | | | | | | The general idea here is to get rid of the type: ignore annotations on all of the current_token and update_function assignments, which would have caught #7290. After a bit of experimentation, it seems like the least-awful way to do this is to pass the offending functions in as parameters to the Stream constructor. Unfortunately that means that the concrete implementations no longer have the same constructor signature as Stream itself, which means that it gets hard to correctly annotate STREAMS_MAP. I've also introduced a couple of new types, to take out some duplication.
* Move catchup of replication streams to worker. (#7024)Erik Johnston2020-03-251-5/+14
| | | 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.
* Convert `*StreamRow` classes to inner classes (#7116)Richard van der Hoff2020-03-231-8/+8
| | | | | This just helps keep the rows closer to their streams, so that it's easier to see what the format of each stream is.
* Fixup synapse.replication to pass mypy checks (#6667)Erik Johnston2020-01-141-2/+2
|
* Run Black. (#5482)Amber Brown2019-06-201-4/+8
|
* move FederationStream out to its own fileRichard van der Hoff2019-03-271-0/+39