Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Propagate cache invalidates from workers to other workers. (#6748) | Erik Johnston | 2020-01-27 | 2 | -4/+7 |
| | | | Currently if a worker invalidates a cache it will be streamed to master, which then didn't forward those to other workers. | ||||
* | Allow streaming cache invalidate all to workers. (#6749) | Erik Johnston | 2020-01-22 | 1 | -5/+21 |
| | |||||
* | Wake up transaction queue when remote server comes back online (#6706) | Erik Johnston | 2020-01-17 | 4 | -0/+44 |
| | | | | | This will be used to retry outbound transactions to a remote server if we think it might have come back up. | ||||
* | Port synapse.replication.tcp to async/await (#6666) | Erik Johnston | 2020-01-16 | 5 | -85/+63 |
| | | | | | | | | | | * Port synapse.replication.tcp to async/await * Newsfile * Correctly document type of on_<FOO> functions as async * Don't be overenthusiastic with the asyncing.... | ||||
* | Fixup synapse.replication to pass mypy checks (#6667) | Erik Johnston | 2020-01-14 | 7 | -77/+93 |
| | |||||
* | Reduce the reconnect time when replication fails. (#6617) | Richard van der Hoff | 2020-01-03 | 1 | -1/+2 |
| | |||||
* | lint | Andrew Morgan | 2019-11-08 | 1 | -2/+1 |
| | |||||
* | Remove content from being sent for account data rdata stream | Andrew Morgan | 2019-11-08 | 1 | -3/+3 |
| | |||||
* | document the REPLICATE command a bit better (#6305) | Richard van der Hoff | 2019-11-04 | 2 | -8/+86 |
| | | | | since I found myself wonder how it works | ||||
* | Merge branch 'develop' into uhoreg/cross_signing_fix_workers_notify | Hubert Chathi | 2019-10-31 | 2 | -2/+2 |
|\ | |||||
| * | Remove usage of deprecated logger.warn method from codebase (#6271) | Andrew Morgan | 2019-10-31 | 2 | -2/+2 |
| | | | | | | Replace every instance of `logger.warn` with `logger.warning` as the former is deprecated. | ||||
* | | make user signatures a separate stream | Hubert Chathi | 2019-10-30 | 2 | -0/+19 |
|/ | |||||
* | Remove unnecessary parentheses around return statements (#5931) | Andrew Morgan | 2019-08-30 | 1 | -4/+4 |
| | | | | | Python will return a tuple whether there are parentheses around the returned values or not. I'm just sick of my editor complaining about this all over the place :) | ||||
* | Replace returnValue with return (#5736) | Amber Brown | 2019-07-23 | 2 | -7/+7 |
| | |||||
* | Move logging utilities out of the side drawer of util/ and into logging/ (#5606) | Amber Brown | 2019-07-04 | 1 | -1/+1 |
| | |||||
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 7 | -183/+228 |
| | |||||
* | Fix relations in worker mode | Erik Johnston | 2019-05-16 | 2 | -5/+7 |
| | |||||
* | Combine the CurrentStateDeltaStream into the EventStream | Richard van der Hoff | 2019-03-27 | 3 | -23/+33 |
| | |||||
* | Make EventStream rows have a type | Richard van der Hoff | 2019-03-27 | 2 | -14/+88 |
| | | | | ... as a precursor to combining it with the CurrentStateDelta stream. | ||||
* | Skip building a ROW_TYPE when building updates | Richard van der Hoff | 2019-03-27 | 1 | -2/+2 |
| | | | | | We're about to turn it straight into a JSON object anyway so building a ROW_TYPE is a bit pointless, and reduces flexibility in the update_function. | ||||
* | Add parse_row method to replication stream class | Richard van der Hoff | 2019-03-27 | 3 | -3/+19 |
| | | | | This will allow individual stream classes to override how a row is parsed. | ||||
* | move FederationStream out to its own file | Richard van der Hoff | 2019-03-27 | 4 | -23/+43 |
| | |||||
* | move EventsStream out to its own file | Richard van der Hoff | 2019-03-27 | 3 | -23/+42 |
| | |||||
* | Move replication.tcp.streams into a package | Richard van der Hoff | 2019-03-27 | 2 | -33/+51 |
| | |||||
* | Fix/improve some docstrings in the replication code. (#4949) | Richard van der Hoff | 2019-03-27 | 2 | -7/+19 |
| | |||||
* | Fix ClientReplicationStreamProtocol.__str__ (#4929) | Richard van der Hoff | 2019-03-25 | 2 | -4/+5 |
| | | | | | | | | `__str__` depended on `self.addr`, which was absent from ClientReplicationStreamProtocol, so attempting to call str on such an object would raise an exception. We can calculate the peer addr from the transport, so there is no need for addr anyway. | ||||
* | Fix bug where read-receipts lost their timestamps (#4927) | Richard van der Hoff | 2019-03-25 | 2 | -11/+27 |
| | | | | | Make sure that they are sent correctly over the replication stream. Fixes: #4898 | ||||
* | Add a config option for torture-testing worker replication. (#4902) | Richard van der Hoff | 2019-03-20 | 1 | -1/+17 |
| | | | Setting this to 50 or so makes a bunch of sytests fail in worker mode. | ||||
* | Simplify token replication logic | Andrew Morgan | 2019-03-05 | 1 | -23/+14 |
| | |||||
* | Clean up logic and add comments | Andrew Morgan | 2019-03-04 | 1 | -11/+18 |
| | |||||
* | Clearer branching, fix missing list clear | Andrew Morgan | 2019-03-04 | 1 | -4/+11 |
| | |||||
* | Prevent replication wedging | Andrew Morgan | 2019-03-04 | 1 | -4/+24 |
| | |||||
* | Merge pull request #4749 from matrix-org/erikj/replication_connection_backoff | Erik Johnston | 2019-02-27 | 3 | -5/+39 |
|\ | | | | | Fix tightloop over connecting to replication server | ||||
| * | Move connecting logic into ClientReplicationStreamProtocol | Erik Johnston | 2019-02-27 | 2 | -18/+17 |
| | | |||||
| * | Increase the max delay between retry attempts | Erik Johnston | 2019-02-26 | 1 | -1/+1 |
| | | | | | | | | | | Otherwise if you have many workers they can easily take out master with their connection attempts | ||||
| * | Fix tightloop over connecting to replication server | Erik Johnston | 2019-02-26 | 2 | -4/+39 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | | Limit cache invalidation replication line length (#4748) | Erik Johnston | 2019-02-27 | 1 | -1/+16 |
|/ | |||||
* | Don't truncate command name in metrics | Erik Johnston | 2018-10-29 | 1 | -2/+2 |
| | |||||
* | Make the replication logger quieter (#4108) | Amber Brown | 2018-10-29 | 1 | -1/+1 |
| | |||||
* | Fix minor typo in exception | Travis Ralston | 2018-09-13 | 1 | -1/+1 |
| | |||||
* | Remove conn_id | Erik Johnston | 2018-09-04 | 1 | -2/+2 |
| | |||||
* | Remove conn_id from repl prometheus metrics | Erik Johnston | 2018-09-03 | 1 | -10/+10 |
| | | | | | `conn_id` gets set to a random string, and so we end up filling up prometheus with tonnes of data series, which is bad. | ||||
* | Logcontexts for replication command handlers | Richard van der Hoff | 2018-08-17 | 3 | -15/+43 |
| | | | | | | | | | | 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. | ||||
* | Fix unit tests | Richard van der Hoff | 2018-07-25 | 1 | -1/+1 |
| | | | | | | 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. | ||||
* | Wrap a number of things that run in the background | Richard van der Hoff | 2018-07-25 | 1 | -6/+8 |
| | | | | | This will reduce the number of "Starting db connection from sentinel context" warnings, and will help with our metrics. | ||||
* | run isort | Amber Brown | 2018-07-09 | 4 | -30/+41 |
| | |||||
* | Attempt to be more performant on PyPy (#3462) | Amber Brown | 2018-06-28 | 1 | -6/+10 |
| | |||||
* | Remove all global reactor imports & pass it around explicitly (#3424) | Amber Brown | 2018-06-25 | 2 | -5/+5 |
| | |||||
* | Fix tcp protocol metrics naming (#3410) | Amber Brown | 2018-06-21 | 1 | -18/+35 |
| | |||||
* | Fix replication metrics | Richard van der Hoff | 2018-06-04 | 1 | -2/+2 |
| | | | | fix bug introduced in #3256 | ||||
* | Merge remote-tracking branch 'origin/develop' into 3218-official-prom | Amber Brown | 2018-05-28 | 2 | -8/+9 |
|\ | |||||
| * | Merge pull request #3244 from NotAFile/py3-six-4 | Amber Brown | 2018-05-24 | 2 | -5/+7 |
| |\ | | | | | | | replace some iteritems with six | ||||
| | * | replace some iteritems with six | Adrian Tschira | 2018-05-19 | 2 | -5/+7 |
| | | | | | | | | | | | | Signed-off-by: Adrian Tschira <nota@notafile.com> | ||||
* | | | more cleanup | Amber Brown | 2018-05-22 | 2 | -6/+10 |
| | | | |||||
* | | | fix the test failures | Amber Brown | 2018-05-22 | 1 | -1/+1 |
| | | | |||||
* | | | cleanups, self-registration | Amber Brown | 2018-05-22 | 1 | -4/+5 |
| | | | |||||
* | | | Merge remote-tracking branch 'origin/develop' into 3218-official-prom | Amber Brown | 2018-05-22 | 1 | -0/+2 |
|\| | | |||||
| * | | Send users a server notice about consent | Richard van der Hoff | 2018-05-22 | 1 | -0/+2 |
| |/ | | | | | | | | | When a user first syncs, we will send them a server notice asking them to consent to the privacy policy if they have not already done so. | ||||
* | | rest of the changes | Amber Brown | 2018-05-21 | 1 | -16/+14 |
| | | |||||
* | | replacing portions | Amber Brown | 2018-05-21 | 1 | -54/+34 |
|/ | |||||
* | make imports local | Adrian Tschira | 2018-04-28 | 2 | -4/+4 |
| | | | | Signed-off-by: Adrian Tschira <nota@notafile.com> | ||||
* | Fix json encoding bug in replication | Richard van der Hoff | 2018-04-03 | 1 | -1/+1 |
| | | | | json encoders have an encode method, not a dumps method. | ||||
* | Use static JSONEncoders | Richard van der Hoff | 2018-03-29 | 1 | -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 simplejson | Erik Johnston | 2018-03-20 | 1 | -7/+7 |
| | |||||
* | Fix replication after switch to simplejson | Erik Johnston | 2018-03-19 | 1 | -2/+4 |
| | | | | | Turns out that simplejson serialises namedtuple's as dictionaries rather than tuples by default. | ||||
* | Merge branch 'master' of github.com:matrix-org/synapse into develop | Erik Johnston | 2018-03-19 | 1 | -1/+1 |
|\ | |||||
| * | Replace ujson with simplejson | Erik Johnston | 2018-03-15 | 1 | -1/+1 |
| | | |||||
* | | Metrics for number of RDATA commands received | Richard van der Hoff | 2018-01-15 | 1 | -5/+14 |
|/ | | | | I found myself wishing we had this. | ||||
* | Fix some logcontext leaks in replication resource | Richard van der Hoff | 2017-11-23 | 1 | -2/+4 |
| | | | | | The @measure_func annotations rely on the wrapped function respecting the logcontext rules. Add the necessary yields to make this work. | ||||
* | replace 'except:' with 'except Exception:' | Richard van der Hoff | 2017-10-23 | 1 | -1/+1 |
| | | | | what could possibly go wrong | ||||
* | log when we get an exception handling replication updates | hera | 2017-10-12 | 1 | -1/+5 |
| | |||||
* | Fix replication. And notify | Erik Johnston | 2017-07-20 | 1 | -0/+20 |
| | |||||
* | Reduce log levels in tcp replication | Erik Johnston | 2017-07-11 | 1 | -2/+2 |
| | |||||
* | Serialize user ip command as json | Erik Johnston | 2017-06-27 | 1 | -5/+9 |
| | |||||
* | Make workers report to master for user ip updates | Erik Johnston | 2017-06-27 | 4 | -0/+55 |
| | |||||
* | Initial worker impl | Erik Johnston | 2017-06-16 | 1 | -0/+22 |
| | |||||
* | Add missing notifier | Erik Johnston | 2017-06-09 | 1 | -1/+2 |
| | |||||
* | Typo | Erik Johnston | 2017-04-10 | 1 | -1/+1 |
| | |||||
* | Merge pull request #2109 from matrix-org/erikj/send_queue_fix | Erik Johnston | 2017-04-10 | 1 | -2/+2 |
|\ | | | | | Fix up federation SendQueue and document types | ||||
| * | Comments | Erik Johnston | 2017-04-10 | 1 | -2/+2 |
| | | |||||
* | | Up replication ping timeout | Erik Johnston | 2017-04-10 | 1 | -2/+4 |
|/ | |||||
* | Merge pull request #2103 from matrix-org/erikj/no-double-encode | Erik Johnston | 2017-04-07 | 1 | -28/+76 |
|\ | | | | | Don't double encode replication data | ||||
| * | Document types of the replication streams | Erik Johnston | 2017-04-06 | 1 | -28/+76 |
| | | |||||
* | | Fix incorrect type when using InvalidateCacheCommand | Erik Johnston | 2017-04-06 | 1 | -1/+1 |
| | | |||||
* | | Add log lines | Erik Johnston | 2017-04-05 | 1 | -1/+2 |
| | | |||||
* | | Rearrange metrics | Erik Johnston | 2017-04-05 | 1 | -16/+31 |
| | | |||||
* | | Fix typo | Erik Johnston | 2017-04-05 | 1 | -2/+2 |
| | | |||||
* | | Fixup some metrics for tcp repl | Erik Johnston | 2017-04-05 | 1 | -0/+16 |
|/ | |||||
* | Merge pull request #2097 from matrix-org/erikj/repl_tcp_client | Erik Johnston | 2017-04-05 | 1 | -0/+196 |
|\ | | | | | Move to using TCP replication | ||||
| * | Add basic replication client handler and factory | Erik Johnston | 2017-04-03 | 1 | -0/+196 |
| | | |||||
* | | Merge pull request #2098 from matrix-org/erikj/repl_tcp_fix | Erik Johnston | 2017-04-04 | 3 | -6/+15 |
|\ \ | | | | | | | Advance replication streams even if nothing is listening | ||||
| * | | Advance replication streams even if nothing is listening | Erik Johnston | 2017-04-04 | 3 | -6/+15 |
| |/ | | | | | | | | | | | Otherwise the streams don't advance and steadily fall behind, so when a worker does connect either a) they'll be streamed lots of old updates or b) the connection will fail as the streams are too far behind. | ||||
* / | Fiddle tcp replication logging | Erik Johnston | 2017-04-04 | 1 | -2/+2 |
|/ | |||||
* | Always advance stream tokens | Erik Johnston | 2017-04-03 | 1 | -1/+4 |
| | |||||
* | Use callbacks to notify tcp replication rather than deferreds | Erik Johnston | 2017-03-31 | 1 | -14/+1 |
| | |||||
* | Add a timestamp to USER_SYNC command | Erik Johnston | 2017-03-31 | 3 | -9/+17 |
| | | | | This timestamp is used to indicate when the user last sync'd | ||||
* | Fix up docs | Erik Johnston | 2017-03-31 | 2 | -19/+3 |
| | |||||
* | Add server side resource for tcp replication | Erik Johnston | 2017-03-30 | 1 | -0/+300 |
| | |||||
* | Initial TCP protocol implementation | Erik Johnston | 2017-03-30 | 3 | -0/+974 |
| | | | | This defines the low level TCP replication protocol | ||||
* | Define the various streams we will replicate | Erik Johnston | 2017-03-30 | 2 | -0/+423 |