summary refs log tree commit diff
path: root/synapse/replication/tcp/commands.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Run Black. (#5482)Amber Brown2019-06-201-23/+48
|
* Fix tightloop over connecting to replication serverErik Johnston2019-02-261-1/+4
| | | | | | | | | | | | | | | If the client failed to process incoming commands during the initial set up of the replication connection it would immediately disconnect and reconnect, resulting in a tightloop. This can happen, for example, when subscribing to a stream that has a row that is too long in the backlog. The fix here is to not consider the connection successfully set up until the client has succesfully subscribed and caught up with the streams. This ensures that the retry logic timers aren't reset until then, meaning that if an error does happen during start up the client will continue backing off before retrying again.
* Logcontexts for replication command handlersRichard van der Hoff2018-08-171-0/+12
| | | | | | | | | | Run the handlers for replication commands as background processes. This should improve the visibility in our metrics, and reduce the number of "running db transaction from sentinel context" warnings. Ideally it means converting the things that fire off deferreds into the night into things that actually return a Deferred when they are done. I've made a bit of a stab at this, but it will probably be leaky.
* Attempt to be more performant on PyPy (#3462)Amber Brown2018-06-281-6/+10
|
* Fix json encoding bug in replicationRichard van der Hoff2018-04-031-1/+1
| | | | json encoders have an encode method, not a dumps method.
* Use static JSONEncodersRichard van der Hoff2018-03-291-3/+5
| | | | | using json.dumps with custom options requires us to create a new JSONEncoder on each call. It's more efficient to create one upfront and reuse it.
* Explicitly use simplejsonErik Johnston2018-03-201-7/+7
|
* Fix replication after switch to simplejsonErik Johnston2018-03-191-2/+4
| | | | | Turns out that simplejson serialises namedtuple's as dictionaries rather than tuples by default.
* Replace ujson with simplejsonErik Johnston2018-03-151-1/+1
|
* Serialize user ip command as jsonErik Johnston2017-06-271-5/+9
|
* Make workers report to master for user ip updatesErik Johnston2017-06-271-0/+32
|
* Add a timestamp to USER_SYNC commandErik Johnston2017-03-311-5/+10
| | | | This timestamp is used to indicate when the user last sync'd
* Initial TCP protocol implementationErik Johnston2017-03-301-0/+341
This defines the low level TCP replication protocol