Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Remove redundant "coding: utf-8" lines (#9786) | Jonathan de Jong | 2021-04-14 | 1 | -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>` | ||||
* | Merge worker apps into one. (#6964) | Erik Johnston | 2020-02-25 | 1 | -205/+4 |
| | |||||
* | Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957) | Patrick Cloke | 2020-02-21 | 1 | -1/+1 |
| | | | | Ensure good comprehension hygiene using flake8-comprehensions. | ||||
* | Port synapse.replication.tcp to async/await (#6666) | Erik Johnston | 2020-01-16 | 1 | -3/+2 |
| | | | | | | | | | | * Port synapse.replication.tcp to async/await * Newsfile * Correctly document type of on_<FOO> functions as async * Don't be overenthusiastic with the asyncing.... | ||||
* | Merge pull request #6511 from matrix-org/erikj/remove_db_config_from_apps | Erik Johnston | 2019-12-12 | 1 | -5/+0 |
|\ | | | | | Move database config from apps into HomeServer object | ||||
| * | Remove database config parsing from apps. | Erik Johnston | 2019-12-10 | 1 | -5/+0 |
| | | |||||
* | | Make the PusherSlaveStore inherit from the slave RoomStore | Brendan Abolivier | 2019-12-10 | 1 | -1/+6 |
|/ | | | | So that it has access to the get_retention_policy_for_room function which is required by filter_events_for_client. | ||||
* | Remove usage of deprecated logger.warn method from codebase (#6271) | Andrew Morgan | 2019-10-31 | 1 | -2/+2 |
| | | | Replace every instance of `logger.warn` with `logger.warning` as the former is deprecated. | ||||
* | Implement a structured logging output system. (#5680) | Amber Brown | 2019-08-28 | 1 | -2/+2 |
| | |||||
* | Call startup commands as system triggers. | Erik Johnston | 2019-07-22 | 1 | -1/+1 |
| | | | | | This helps ensures that we only consider ourselves "up" once all the startup functions have completed. | ||||
* | Support Prometheus_client 0.4.0+ (#5636) | Amber Brown | 2019-07-18 | 1 | -2/+1 |
| | |||||
* | 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 | 1 | -36/+24 |
| | |||||
* | Deduplicate some code in synapse.app (#4567) | Amber Brown | 2019-02-08 | 1 | -2/+1 |
| | |||||
* | Remove redundant run_as_background_process() from pusherpool | Richard van der Hoff | 2018-10-22 | 1 | -2/+2 |
| | | | | | | | `on_new_notifications` and `on_new_receipts` in `HttpPusher` and `EmailPusher` now always return synchronously, so we can remove the `defer.gatherResults` on their results, and the `run_as_background_process` wrappers can be removed too because the PusherPool methods will now complete quickly enough. | ||||
* | Rename _refresh_pusher | Richard van der Hoff | 2018-10-22 | 1 | -1/+1 |
| | | | | | This is public (or at least, called from outside the class), so ought to have a better name. | ||||
* | Make workers work on Py3 (#4027) | Amber Brown | 2018-10-13 | 1 | -7/+8 |
| | |||||
* | Replaced all occurences of e.message with str(e) | Schnuffle | 2018-09-27 | 1 | -1/+1 |
| | | | | Signed-off-by: Schnuffle <schnuffle@github.com> | ||||
* | Fix some instances of ExpiringCache not expiring cache items | Erik Johnston | 2018-09-21 | 1 | -1/+0 |
| | | | | | | | | ExpiringCache required that `start()` be called before it would actually start expiring entries. A number of places didn't do that. This PR removes `start` from ExpiringCache, and automatically starts backround reaping process on creation instead. | ||||
* | Make sure that we close db connections opened during init | Richard van der Hoff | 2018-08-28 | 1 | -4/+1 |
| | | | | | | | | | We should explicitly close any db connections we open, because failing to do so can block other transactions as per https://github.com/matrix-org/synapse/issues/3682. Let's also try to factor out some of the boilerplate by having server classes define their datastore class rather than duplicating the whole of `setup`. | ||||
* | Merge pull request #3709 from matrix-org/rav/logcontext_for_replication_commands | Richard van der Hoff | 2018-08-17 | 1 | -1/+2 |
|\ | | | | | Logcontexts for replication command handlers | ||||
| * | Logcontexts for replication command handlers | Richard van der Hoff | 2018-08-17 | 1 | -1/+2 |
| | | | | | | | | | | | | | | | | | | | | 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 logcontexts for running pushers | Richard van der Hoff | 2018-08-17 | 1 | -2/+2 |
|/ | | | | | | | First of all, avoid resetting the logcontext before running the pushers, to fix the "Starting db txn 'get_all_updated_receipts' from sentinel context" warning. Instead, give them their own "background process" logcontexts. | ||||
* | run isort | Amber Brown | 2018-07-09 | 1 | -2/+3 |
| | |||||
* | The flag is named enable_metrics, not collect_metrics | Travis Ralston | 2018-06-12 | 1 | -1/+1 |
| | | | Signed-off-by: Travis Ralston <travpc@gmail.com> | ||||
* | Run Prometheus on a different port, optionally. (#3274) | Amber Brown | 2018-05-31 | 1 | -1/+9 |
| | |||||
* | Set Server header in SynapseRequest | Richard van der Hoff | 2018-05-10 | 1 | -0/+1 |
| | | | | | | | | | | | | (instead of everywhere that writes a response. Or rather, the subset of places which write responses where we haven't forgotten it). This also means that we don't have to have the mysterious version_string attribute in anything with a request handler. Unfortunately it does mean that we have to pass the version string wherever we instantiate a SynapseSite, which has been c&ped 150 times, but that is code that ought to be cleaned up anyway really. | ||||
* | Merge remote-tracking branch 'origin/develop' into rav/use_run_in_background | Richard van der Hoff | 2018-04-27 | 1 | -14/+17 |
|\ | |||||
| * | Improve exception handling for background processes | Richard van der Hoff | 2018-04-27 | 1 | -14/+17 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a bunch of places where we fire off a process to happen in the background, but don't have any exception handling on it - instead relying on the unhandled error being logged when the relevent deferred gets garbage-collected. This is unsatisfactory for a number of reasons: - logging on garbage collection is best-effort and may happen some time after the error, if at all - it can be hard to figure out where the error actually happened. - it is logged as a scary CRITICAL error which (a) I always forget to grep for and (b) it's not really CRITICAL if a background process we don't care about fails. So this is an attempt to add exception handling to everything we fire off into the background. | ||||
* | | Use run_in_background in preference to preserve_fn | Richard van der Hoff | 2018-04-27 | 1 | -2/+2 |
|/ | | | | | | While I was going through uses of preserve_fn for other PRs, I converted places which only use the wrapped function once to use run_in_background, to avoid creating the function object. | ||||
* | 404 correctly on missing paths via NoResource | Matthew Hodgson | 2018-03-23 | 1 | -2/+2 |
| | | | | fixes https://github.com/matrix-org/synapse/issues/2043 and https://github.com/matrix-org/synapse/issues/2029 | ||||
* | Move storage functions for push calculations | Erik Johnston | 2018-02-27 | 1 | -5/+0 |
| | | | | This will allow push actions for an event to be calculated on workers. | ||||
* | Factor out get_db_conn to HomeServer base class | Richard van der Hoff | 2018-01-26 | 1 | -13/+0 |
| | | | | | This function is identical to all subclasses, so we may as well push it up to the base class to reduce duplication (and make use of it in the tests) | ||||
* | Implement listen_tcp method in remaining workers | Silke | 2017-12-18 | 1 | -21/+17 |
| | | | | Signed-off-by: Silke <silke@slxh.eu> | ||||
* | Factor out common application start | Richard van der Hoff | 2017-08-15 | 1 | -44/+13 |
| | | | | | We have 10 copies of this code, and I don't really want to update each one separately. | ||||
* | Add the appropriate amount of preserve_fn | Erik Johnston | 2017-04-04 | 1 | -6/+7 |
| | |||||
* | Update all the workers and master to use TCP replication | Erik Johnston | 2017-04-03 | 1 | -79/+46 |
| | |||||
* | Run the reactor with the sentinel logcontext | Richard van der Hoff | 2017-03-18 | 1 | -2/+7 |
| | | | | | | This fixes a class of 'Unexpected logcontext' messages, which were happening because the logcontext was somewhat arbitrarily swapping between the sentinel and the `run` logcontext. | ||||
* | Refactor logger config for workers | Richard van der Hoff | 2017-03-10 | 1 | -1/+1 |
| | | | | - to make it easier to add more config options. | ||||
* | Restore default bind address | Erik Johnston | 2017-01-10 | 1 | -10/+2 |
| | |||||
* | Remove spurious for..else.. | Erik Johnston | 2017-01-10 | 1 | -11/+0 |
| | |||||
* | Fix check for bind_address | Johannes Löthberg | 2016-12-20 | 1 | -2/+2 |
| | | | | | | | The empty string is a valid setting for the bind_address option, so explicitly check for None here instead. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> | ||||
* | Add support for specifying multiple bind addresses | Johannes Löthberg | 2016-12-18 | 1 | -20/+45 |
| | | | | Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> | ||||
* | Respect use_frozen_dicts option in workers | Erik Johnston | 2016-11-08 | 1 | -0/+4 |
| | |||||
* | Reduce DB hits for replication | Erik Johnston | 2016-09-23 | 1 | -2/+2 |
| | | | | | | | | | | | | | | Some streams will occaisonally advance their positions without actually having any new rows to send over federation. Currently this means that the token will not advance on the workers, leading to them repeatedly sending a slightly out of date token. This in turns requires the master to hit the DB to check if there are any new rows, rather than hitting the no op logic where we check if the given token matches the current token. This commit changes the API to always return an entry if the position for a stream has changed, allowing workers to advance their tokens correctly. | ||||
* | Enable state caches on workers | Erik Johnston | 2016-09-15 | 1 | -0/+1 |
| | |||||
* | Remove broken cache stuff | Erik Johnston | 2016-08-15 | 1 | -16/+0 |
| | |||||
* | Add federation /version API | Erik Johnston | 2016-08-05 | 1 | -1/+1 |
| | |||||
* | Fix setting gc thresholds in the workers | Mark Haines | 2016-06-17 | 1 | -1/+2 |
| | |||||
* | Use worker_ prefixes for worker config, use existing support for multiple ↵ | Mark Haines | 2016-06-16 | 1 | -17/+12 |
| | | | | config files | ||||
* | Access the event_cache_size directly from the server object. | Mark Haines | 2016-06-16 | 1 | -3/+3 |
| | | | | | This means that the workers can override the event_cache_size directly without clobbering the value in the main synapse config. | ||||
* | Access replication_url from the worker config directly | Mark Haines | 2016-06-16 | 1 | -2/+3 |
| | |||||
* | Inline the synchrotron and pusher configs into the main config | Mark Haines | 2016-06-16 | 1 | -125/+46 |
| | |||||
* | Add gc_threshold to pusher and synchrotron | Erik Johnston | 2016-06-07 | 1 | -0/+14 |
| | |||||
* | Allow setting of gc.set_thresholds | Erik Johnston | 2016-06-07 | 1 | -0/+5 |
| | |||||
* | Yield on the sleeps intended to backoff replication | Mark Haines | 2016-06-06 | 1 | -1/+1 |
| | |||||
* | Working unsubscribe links going straight to the HS | David Baker | 2016-06-02 | 1 | -1/+22 |
| | | | | and authed by macaroons that let you delete pushers and nothing else | ||||
* | Manually expire broken caches like the who_forgot_in_room | Mark Haines | 2016-05-13 | 1 | -0/+16 |
| | |||||
* | Use the SlavedAccountDataStore | Mark Haines | 2016-05-13 | 1 | -10/+3 |
| | |||||
* | Shift some of the state_group methods into the SlavedEventStore | Mark Haines | 2016-05-13 | 1 | -45/+0 |
| | |||||
* | Make email notifs work on the pusher synapse | David Baker | 2016-05-13 | 1 | -0/+47 |
| | | | | Plus general bugfix to email notif code | ||||
* | Pass through _get_state_group_for_events | David Baker | 2016-05-10 | 1 | -0/+4 |
| | |||||
* | StateStore, not EventsStore | David Baker | 2016-05-10 | 1 | -2/+2 |
| | |||||
* | Cached functions must be accessed through the dict | David Baker | 2016-05-10 | 1 | -1/+2 |
| | |||||
* | Pass though _get_state_group_for_events | David Baker | 2016-05-10 | 1 | -0/+4 |
| | |||||
* | Pass through get_state_groups | David Baker | 2016-05-10 | 1 | -0/+4 |
| | |||||
* | Also pass through get_profile_displayname | David Baker | 2016-05-10 | 1 | -0/+4 |
| | |||||
* | Add date header & message id | David Baker | 2016-05-04 | 1 | -1/+2 |
| | |||||
* | Add db functions used for email to the pusher app | David Baker | 2016-05-04 | 1 | -0/+12 |
| | |||||
* | Actually start the pusher daemon | Mark Haines | 2016-04-26 | 1 | -0/+2 |
| | |||||
* | Fix typo in default pusher config | Mark Haines | 2016-04-26 | 1 | -1/+1 |
| | |||||
* | Add a log context to the daemonized pusher | Mark Haines | 2016-04-26 | 1 | -1/+6 |
| | |||||
* | Optionally daemonize the pusher | Mark Haines | 2016-04-26 | 1 | -4/+31 |
| | |||||
* | Add a couple of update methods to the PusherSlaveStore | Mark Haines | 2016-04-26 | 1 | -0/+8 |
| | |||||
* | Remove the uncomments from the comments | Mark Haines | 2016-04-25 | 1 | -2/+2 |
| | |||||
* | Add a metrics listener and a ssh listener to the pusher | Mark Haines | 2016-04-25 | 1 | -2/+67 |
| | |||||
* | Optionally split out the pushers into a separate process | Mark Haines | 2016-04-21 | 1 | -0/+208 |