Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge pull request #3735 from matrix-org/travis/federation-spelling | Richard van der Hoff | 2018-08-22 | 1 | -1/+1 |
|\ | | | | | limt -> limit | ||||
| * | limt -> limit | Travis Ralston | 2018-07-31 | 1 | -1/+1 |
| | | |||||
* | | Log more detail when we fail to authenticate request | Erik Johnston | 2018-08-21 | 1 | -3/+3 |
| | | |||||
* | | Don't log exceptions when failing to fetch server keys | Erik Johnston | 2018-08-21 | 1 | -2/+2 |
| | | | | | | | | | | Not being able to resolve or connect to remote servers is an expected error, so we shouldn't log at ERROR with stacktraces. | ||||
* | | Integrate presence from hotfixes (#3694) | Amber Brown | 2018-08-18 | 1 | -0/+4 |
| | | |||||
* | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2018-08-15 | 1 | -4/+4 |
|\ \ | | | | | | | | | | erikj/split_federation | ||||
| * | | Rename async to async_helpers because `async` is a keyword on Python 3.7 (#3678) | Amber Brown | 2018-08-10 | 1 | -4/+4 |
| | | | |||||
* | | | Fixup doc comments | Erik Johnston | 2018-08-09 | 1 | -0/+11 |
| | | | |||||
* | | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2018-08-09 | 5 | -13/+132 |
|\| | | | | | | | | | | | erikj/split_federation | ||||
| * | | Merge pull request #3664 from matrix-org/rav/federation_metrics | Richard van der Hoff | 2018-08-08 | 1 | -1/+9 |
| |\ \ | | | | | | | | | more metrics for the federation and appservice senders | ||||
| | * | | more metrics for the federation and appservice senders | Richard van der Hoff | 2018-08-07 | 1 | -1/+9 |
| | | | | |||||
| * | | | Check m.room.create for sane room_versions | Richard van der Hoff | 2018-08-06 | 1 | -3/+23 |
| | | | | |||||
| * | | | include known room versions in outgoing make_joins | Richard van der Hoff | 2018-08-06 | 2 | -4/+9 |
| | | | | |||||
| * | | | sanity check response from make_join | Richard van der Hoff | 2018-08-03 | 1 | -1/+3 |
| | | | | |||||
| * | | | Enforce compatibility when processing make_join requests | Richard van der Hoff | 2018-08-03 | 2 | -4/+41 |
| | | | | | | | | | | | | | | | | | | | | | | | | Reject make_join requests from servers which do not support the room version. Also include the room version in the response. | ||||
| * | | | Docstrings for BaseFederationServlet | Richard van der Hoff | 2018-08-03 | 1 | -0/+47 |
| |/ / | | | | | | | | | | ... to save me reverse-engineering this stuff again. | ||||
* / / | Add EDU/query handling over replication | Erik Johnston | 2018-08-06 | 1 | -0/+43 |
|/ / | |||||
* | | Merge pull request #3639 from matrix-org/rav/refactor_error_handling | Richard van der Hoff | 2018-08-02 | 1 | -12/+17 |
|\ \ | | | | | | | Clean up handling of errors from outbound requests | ||||
| * | | Refactor code for turning HttpResponseException into SynapseError | Richard van der Hoff | 2018-08-01 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | | | | | | | | | | This commit replaces SynapseError.from_http_response_exception with HttpResponseException.to_synapse_error. The new method actually returns a ProxiedRequestError, which allows us to pass through additional metadata from the API call. | ||||
| * | | Be more careful which errors we send back over the C-S API | Richard van der Hoff | 2018-08-01 | 1 | -12/+17 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We really shouldn't be sending all CodeMessageExceptions back over the C-S API; it will include things like 401s which we shouldn't proxy. That means that we need to explicitly turn a few HttpResponseExceptions into SynapseErrors in the federation layer. The effect of the latter is that the matrix errcode will get passed through correctly to calling clients, which might help with some of the random M_UNKNOWN errors when trying to join rooms. | ||||
* | | | Merge pull request #3638 from ↵ | Richard van der Hoff | 2018-08-02 | 1 | -129/+148 |
|\| | | | | | | | | | | | | | | matrix-org/rav/refactor_federation_client_exception_handling Factor out exception handling in federation_client | ||||
| * | | Factor out exception handling in federation_client | Richard van der Hoff | 2018-08-01 | 1 | -129/+148 |
| | | | | | | | | | | | | | | | Factor out the error handling from make_membership_event, send_join, and send_leave, so that it can be shared. | ||||
* | | | Merge branch 'master' into develop | Richard van der Hoff | 2018-08-02 | 1 | -0/+1 |
|\ \ \ | |/ / |/| | | |||||
| * | | Validation for events/rooms in fed requests | Richard van der Hoff | 2018-08-02 | 1 | -0/+1 |
| | | | | | | | | | | | | | | | | | | | | | When we get a federation request which refers to an event id, make sure that said event is in the room the caller claims it is in. (patch supplied by @turt2live) | ||||
* | | | Python 3: Convert some unicode/bytes uses (#3569) | Amber Brown | 2018-08-02 | 1 | -1/+1 |
| |/ |/| | |||||
* | | Remove pdu_failures from transactions | Travis Ralston | 2018-07-30 | 5 | -96/+7 |
| | | | | | | The field is never read from, and all the opportunities given to populate it are not utilized. It should be very safe to remove this. | ||||
* | | Update the send_leave path to be an event_id | Travis Ralston | 2018-07-26 | 1 | -2/+2 |
| | | | | | | It's still not used, however the parameter is an event ID not a transaction ID. | ||||
* | | Improve logging for exceptions handling PDUs | Richard van der Hoff | 2018-07-23 | 1 | -3/+8 |
| | | | | | | | | when we get an exception handling a federation PDU, log the whole stacktrace. | ||||
* | | Run things as background processes | Richard van der Hoff | 2018-07-18 | 1 | -9/+6 |
| | | | | | | | | | | | | | | | | This fixes #3518, and ensures that we get useful logs and metrics for lots of things that happen in the background. (There are certainly more things that happen in the background; these are just the common ones I've found running a single-process synapse locally). | ||||
* | | Resource tracking for background processes | Richard van der Hoff | 2018-07-18 | 1 | -5/+7 |
|/ | | | | | | | | | | | | | | | | This introduces a mechanism for tracking resource usage by background processes, along with an example of how it will be used. This will help address #3518, but more importantly will give us better insights into things which are happening but not being shown up by the request metrics. We *could* do this with Measure blocks, but: - I think having them pulled out as a completely separate metric class will make it easier to distinguish top-level processes from those which are nested. - I want to be able to report on in-flight background processes, and I don't think we want to do this for *all* Measure blocks. | ||||
* | rename assert_params_in_request to assert_params_in_dict | Krombel | 2018-07-13 | 1 | -2/+2 |
| | | | | | | the method "assert_params_in_request" does handle dicts and not requests. A request body has to be parsed to json before this method can be used | ||||
* | run isort | Amber Brown | 2018-07-09 | 9 | -64/+57 |
| | |||||
* | Implementation of server_acls | Richard van der Hoff | 2018-07-04 | 2 | -4/+154 |
| | | | | | ... as described at https://docs.google.com/document/d/1EttUVzjc2DWe2ciw4XPtNpUpIl9lWXGEsy2ewDS7rtw. | ||||
* | More server_name validation | Richard van der Hoff | 2018-07-04 | 1 | -2/+3 |
| | | | | | | | | We need to do a bit more validation when we get a server name, but don't want to be re-doing it all over the shop, so factor out a separate parse_and_validate_server_name, and do the extra validation. Also, use it to verify the server name in the config file. | ||||
* | Reject invalid server names (#3480) | Richard van der Hoff | 2018-07-03 | 1 | -22/+44 |
| | | | | | Make sure that server_names used in auth headers are sane, and reject them with a sensible error code, before they disappear off into the depths of the system. | ||||
* | Merge pull request #3456 from matrix-org/hawkowl/federation-prevevent-checking | Erik Johnston | 2018-06-29 | 1 | -1/+3 |
|\ | | | | | Check the state of prev_events a bit more thoroughly when coming over federation | ||||
| * | handle federation not telling us about prev_events | Amber Brown | 2018-06-27 | 1 | -1/+3 |
| | | |||||
* | | Attempt to be more performant on PyPy (#3462) | Amber Brown | 2018-06-28 | 1 | -1/+1 |
|/ | |||||
* | Merge pull request #3428 from matrix-org/erikj/persisted_pdu | Erik Johnston | 2018-06-22 | 1 | -12/+1 |
|\ | | | | | Simplify get_persisted_pdu | ||||
| * | simplify get_persisted_pdu | Richard van der Hoff | 2018-06-12 | 1 | -12/+1 |
| | | | | | | | | | | it doesn't make much sense to use get_persisted_pdu on the receive path: just get the event straight from the store. | ||||
* | | Populate synapse_federation_client_sent_pdu_destinations:count again (#3386) | Amber Brown | 2018-06-21 | 1 | -3/+7 |
| | | |||||
* | | Remove run_on_reactor (#3395) | Amber Brown | 2018-06-14 | 1 | -4/+0 |
|/ | |||||
* | federation/send_queue.py: fix usage of sortedcontainers.SortedDict | Ivan Shapovalov | 2018-06-06 | 1 | -27/+22 |
| | |||||
* | Port to sortedcontainers (with tests!) (#3332) | Amber Brown | 2018-06-06 | 1 | -7/+7 |
| | |||||
* | federation/send_queue.py: fix usage of LaterGauge | Ivan Shapovalov | 2018-06-03 | 1 | -1/+1 |
| | | | | | Fixes a startup crash due to commit df9f72d9e5fe264b86005208e0f096156eb03e4b "replacing portions". | ||||
* | Consistently use six's iteritems and wrap lazy keys/values in list() if ↵ | Amber Brown | 2018-05-31 | 3 | -5/+7 |
| | | | | they're not meant to be lazy (#3307) | ||||
* | fixes | Amber Brown | 2018-05-23 | 1 | -4/+4 |
| | |||||
* | cleanup | Amber Brown | 2018-05-22 | 1 | -3/+2 |
| | |||||
* | cleanup pep8 errors | Amber Brown | 2018-05-22 | 2 | -6/+21 |
| | |||||
* | fixes | Amber Brown | 2018-05-22 | 1 | -3/+3 |
| | |||||
* | replacing portions | Amber Brown | 2018-05-21 | 4 | -53/+35 |
| | |||||
* | Merge pull request #3209 from damir-manapov/master | Richard van der Hoff | 2018-05-11 | 1 | -2/+0 |
|\ | | | | | transaction_id, destination defined twice | ||||
| * | transaction_id, destination twice | Damir Manapov | 2018-05-10 | 1 | -2/+0 |
| | | |||||
* | | Merge branch 'release-v0.28.1' into develop | Richard van der Hoff | 2018-05-01 | 1 | -3/+18 |
|\| | |||||
| * | Apply some limits to depth to counter abuse | Richard van der Hoff | 2018-05-01 | 1 | -3/+18 |
| | | | | | | | | | | | | | | * When creating a new event, cap its depth to 2^63 - 1 * When receiving events, reject any without a sensible depth As per https://docs.google.com/document/d/1I3fi2S-XnpO45qrpCsowZv8P8dHcNZ4fsBsbOW7KABI | ||||
* | | Merge branch 'develop' into py3-xrange-1 | Richard van der Hoff | 2018-04-30 | 1 | -2/+3 |
|\ \ | |||||
| * \ | Merge remote-tracking branch 'origin/develop' into rav/use_run_in_background | Richard van der Hoff | 2018-04-27 | 2 | -3/+12 |
| |\ \ | |||||
| * | | | Use run_in_background in preference to preserve_fn | Richard van der Hoff | 2018-04-27 | 1 | -2/+3 |
| | |/ | |/| | | | | | | | | | | | | | 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. | ||||
* | | | Move more xrange to six | Adrian Tschira | 2018-04-28 | 1 | -1/+3 |
| |/ |/| | | | | | | | | | plus a bonus next() Signed-off-by: Adrian Tschira <nota@notafile.com> | ||||
* | | Improve exception handling for background processes | Richard van der Hoff | 2018-04-27 | 2 | -3/+12 |
|/ | | | | | | | | | | | | | | | | | | 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. | ||||
* | Merge pull request #3118 from matrix-org/rav/reject_prev_events | Richard van der Hoff | 2018-04-23 | 1 | -2/+23 |
|\ | | | | | Reject events which have lots of prev_events | ||||
| * | Add some comments | Richard van der Hoff | 2018-04-18 | 1 | -2/+23 |
| | | |||||
* | | Merge pull request #3106 from NotAFile/py3-six-itervalues-1 | Richard van der Hoff | 2018-04-20 | 2 | -9/+13 |
|\ \ | | | | | | | Use six.itervalues in some places | ||||
| * | | Use six.itervalues in some places | Adrian Tschira | 2018-04-15 | 2 | -9/+13 |
| |/ | | | | | | | | | | | There's more where that came from Signed-off-by: Adrian Tschira <nota@notafile.com> | ||||
* | | Merge pull request #3093 from matrix-org/rav/response_cache_wrap | Richard van der Hoff | 2018-04-20 | 1 | -11/+11 |
|\ \ | | | | | | | Refactor ResponseCache usage | ||||
| * | | Reinstate linearizer for federation_server.on_context_state_request | Richard van der Hoff | 2018-04-20 | 1 | -5/+11 |
| | | | |||||
| * | | Refactor ResponseCache usage | Richard van der Hoff | 2018-04-12 | 1 | -11/+5 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a `.wrap` method to ResponseCache which wraps up the boilerplate of a (get, set) pair, and then use it throughout the codebase. This will be largely non-functional, but does include the following functional changes: * federation_server.on_context_state_request: drops use of _server_linearizer which looked redundant and could cause incorrect cache misses by yielding between the get and the set. * RoomListHandler.get_remote_public_room_list(): fixes logcontext leaks * the wrap function includes some logging. I'm hoping this won't be too noisy on production. | ||||
* | | | Refactor store.have_events | Richard van der Hoff | 2018-04-20 | 1 | -1/+1 |
| |/ |/| | | | | | | | | | It turns out that most of the time we were calling have_events, we were only using half of the result. Replace have_events with have_seen_events and get_rejection_reasons, so that we can see what's going on a bit more clearly. | ||||
* | | fix federation_domain_whitelist | Matthew Hodgson | 2018-04-13 | 1 | -6/+6 |
| | | | | | | | | we were checking the wrong server_name on inbound requests | ||||
* | | revert last to PR properly | Matthew Hodgson | 2018-04-13 | 1 | -6/+6 |
| | | |||||
* | | correctly auth inbound federation_domain_whitelist reqs | Matthew Hodgson | 2018-04-13 | 1 | -6/+6 |
| | | |||||
* | | Revert "Use sortedcontainers instead of blist" | Richard van der Hoff | 2018-04-13 | 1 | -7/+7 |
|/ | | | | | | | | | | | This reverts commit 9fbe70a7dc3afabfdac176ba1f4be32dd44602aa. It turns out that sortedcontainers.SortedDict is not an exact match for blist.sorteddict; in particular, `popitem()` removes things from the opposite end of the dict. This is trivial to fix, but I want to add some unit tests, and potentially some more thought about it, before we do so. | ||||
* | Merge pull request #3092 from matrix-org/rav/response_cache_metrics | Richard van der Hoff | 2018-04-12 | 1 | -1/+1 |
|\ | | | | | Add metrics for ResponseCache | ||||
| * | Add metrics for ResponseCache | Richard van der Hoff | 2018-04-10 | 1 | -1/+1 |
| | | |||||
* | | Set all metrics at the same time | Erik Johnston | 2018-04-12 | 1 | -6/+6 |
| | | |||||
* | | Track last processed event received_ts | Erik Johnston | 2018-04-11 | 1 | -0/+11 |
| | | |||||
* | | Track where event stream processing have gotten up to | Erik Johnston | 2018-04-11 | 1 | -0/+4 |
| | | |||||
* | | Merge pull request #2760 from Valodim/pypy | Richard van der Hoff | 2018-04-11 | 1 | -7/+7 |
|\ \ | | | | | | | Synapse on PyPy | ||||
| * | | Use sortedcontainers instead of blist | Vincent Breitmoser | 2018-04-10 | 1 | -7/+7 |
| |/ | | | | | | | | | | | | | | | This commit drop-in replaces blist with SortedContainers. They are written in pure python so work with pypy, but perform as good as native implementations, at least in a couple benchmarks: http://www.grantjenks.com/docs/sortedcontainers/performance.html | ||||
* | | Merge pull request #3078 from matrix-org/erikj/federation_sender | Erik Johnston | 2018-04-10 | 1 | -15/+41 |
|\ \ | | | | | | | Send federation events concurrently | ||||
| * | | Use run_in_background instead | Erik Johnston | 2018-04-10 | 1 | -1/+1 |
| | | | |||||
| * | | Preserve log contexts correctly | Erik Johnston | 2018-04-10 | 1 | -1/+4 |
| | | | |||||
| * | | Log event ID on exception | Erik Johnston | 2018-04-10 | 1 | -1/+4 |
| | | | |||||
| * | | Handle all events in a room correctly | Erik Johnston | 2018-04-09 | 1 | -1/+2 |
| | | | |||||
| * | | Send federation events concurrently | Erik Johnston | 2018-04-09 | 1 | -4/+18 |
| | | | |||||
| * | | Handle exceptions in get_hosts_for_room when sending events over federation | Erik Johnston | 2018-04-09 | 1 | -11/+16 |
| |/ | |||||
* | | Ensure slashes are escaped | Erik Johnston | 2018-04-10 | 1 | -1/+1 |
| | | |||||
* | | URL quote path segments over federation | Erik Johnston | 2018-04-10 | 1 | -48/+80 |
|/ | |||||
* | pep8 | Luke Barnard | 2018-04-06 | 1 | -1/+1 |
| | |||||
* | Fix federation client `set_group_joinable` typo | Luke Barnard | 2018-04-06 | 1 | -1/+1 |
| | |||||
* | Implement group join API | David Baker | 2018-04-06 | 2 | -0/+31 |
| | |||||
* | use PUT instead of POST for federating groups/m.join_policy | Krombel | 2018-04-06 | 2 | -2/+2 |
| | |||||
* | Use "/settings/" (plural) | Luke Barnard | 2018-04-05 | 2 | -2/+2 |
| | |||||
* | Use join_policy API instead of joinable | Luke Barnard | 2018-04-03 | 2 | -6/+6 |
| | | | | | | | | | | | | | | | | | The API is now under /groups/$group_id/setting/m.join_policy and expects a JSON blob of the shape ```json { "m.join_policy": { "type": "invite" } } ``` where "invite" could alternatively be "open". | ||||
* | pep8 | David Baker | 2018-03-28 | 1 | -2/+1 |
| | |||||
* | Add joinability for groups | David Baker | 2018-03-28 | 2 | -0/+37 |
| | | | | | Adds API to set the 'joinable' flag, and corresponding flag in the table. | ||||
* | Merge pull request #2978 from matrix-org/erikj/refactor_replication_layer | Erik Johnston | 2018-03-13 | 1 | -1/+1 |
|\ | | | | | Remove ReplicationLayer and user Client/Server directly | ||||
| * | s/replication_server/federation_server | Erik Johnston | 2018-03-13 | 1 | -1/+1 |
| | | |||||
* | | Merge pull request #2979 from matrix-org/erikj/no_handlers | Erik Johnston | 2018-03-13 | 4 | -69/+2 |
|\| | | | | | Don't build handlers on workers unnecessarily | ||||
| * | Remove unused ReplicationLayer | Erik Johnston | 2018-03-13 | 2 | -59/+0 |
| | | |||||
| * | Split replication layer into two | Erik Johnston | 2018-03-13 | 2 | -10/+2 |
| | | |||||
* | | Merge pull request #2977 from matrix-org/erikj/replication_move_props | Erik Johnston | 2018-03-13 | 4 | -22/+13 |
|\| | | | | | Move property setting from ReplicationLayer to base classes | ||||
| * | Move property setting from ReplicationLayer to FederationBase | Erik Johnston | 2018-03-13 | 4 | -22/+13 |
| | | |||||
* | | Fix docstring types | Erik Johnston | 2018-03-13 | 1 | -2/+2 |
|/ | |||||
* | Split out edu/query registration to a separate class | Erik Johnston | 2018-03-13 | 1 | -48/+69 |
| | |||||
* | Add federation_domain_whitelist option (#2820) | Matthew Hodgson | 2018-01-22 | 4 | -3/+18 |
| | | | | | | Add federation_domain_whitelist gives a way to restrict which domains your HS is allowed to federate with. useful mainly for gracefully preventing a private but internet-connected HS from trying to federate to the wider public Matrix network | ||||
* | Metrics for events processed in appservice and fed sender | Richard van der Hoff | 2018-01-15 | 1 | -0/+4 |
| | | | | More metrics I wished I'd had | ||||
* | Check missing fields in event_from_pdu_json | Richard van der Hoff | 2017-12-30 | 1 | -0/+7 |
| | | | | Return a 400 rather than a 500 when somebody messes up their send_join | ||||
* | Factor out `event_from_pdu_json` | Richard van der Hoff | 2017-12-30 | 3 | -37/+44 |
| | | | | | turns out we have two copies of this, and neither needs to be an instance method | ||||
* | federation_server: clean up imports | Richard van der Hoff | 2017-12-30 | 1 | -14/+11 |
| | |||||
* | federation_client: clean up imports | Richard van der Hoff | 2017-12-30 | 1 | -13/+10 |
| | |||||
* | Clear logcontext before starting fed txn queue runner | Richard van der Hoff | 2017-11-28 | 1 | -2/+8 |
| | | | | | These processes take a long time compared to the request, so there is lots of "Entering|Restoring dead context" in the logs. Let's try to shut it up a bit. | ||||
* | Remove preserve_context_over_{fn, deferred} | Richard van der Hoff | 2017-11-14 | 1 | -2/+2 |
| | | | | | Both of these functions ae known to leak logcontexts. Replace the remaining calls to them and kill them off. | ||||
* | Add brackets | Erik Johnston | 2017-11-09 | 1 | -2/+4 |
| | |||||
* | Have an explicit API to update room config | Erik Johnston | 2017-11-08 | 2 | -1/+36 |
| | |||||
* | Revert "Modify group room association API to allow modification of is_public" | Erik Johnston | 2017-11-08 | 2 | -7/+6 |
| | |||||
* | Update docs for updating room group association | Luke Barnard | 2017-11-01 | 1 | -1/+1 |
| | |||||
* | Flake8 | Luke Barnard | 2017-10-31 | 1 | -3/+4 |
| | |||||
* | Modify group room association API to allow modification of is_public | Luke Barnard | 2017-10-31 | 2 | -4/+4 |
| | | | | also includes renamings to make things more consistent. | ||||
* | Do logcontexts outside ResponseCache | Erik Johnston | 2017-10-25 | 1 | -3/+5 |
| | |||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2017-10-24 | 1 | -3/+3 |
|\ | | | | | | | erikj/group_fed_update_profile | ||||
| * | replace 'except:' with 'except Exception:' | Richard van der Hoff | 2017-10-23 | 1 | -3/+3 |
| | | | | | | | | what could possibly go wrong | ||||
* | | Correctly wire in update group profile over federation | Erik Johnston | 2017-10-23 | 2 | -11/+31 |
|/ | |||||
* | Fix typo | Erik Johnston | 2017-10-19 | 1 | -1/+1 |
| | |||||
* | Fix typo in group attestation handling | Erik Johnston | 2017-10-19 | 1 | -1/+1 |
| | |||||
* | Fix 500 error when we get an error handling a PDU | Richard van der Hoff | 2017-10-17 | 1 | -1/+0 |
| | | | | | | | | | | FederationServer doesn't have a send_failure (and nor does its subclass, ReplicationLayer), so this was failing. I'm not really sure what the idea behind send_failure is, given (a) we don't do anything at the other end with it except log it, and (b) we also send back the failure via the transaction response. I suspect there's a whole lot of dead code around it, but for now I'm just removing the broken bit. | ||||
* | Delint | Luke Barnard | 2017-10-16 | 1 | -0/+2 |
| | |||||
* | Implement GET /groups/$groupId/invited_users | Luke Barnard | 2017-10-16 | 2 | -1/+30 |
| | |||||
* | Merge pull request #2529 from matrix-org/rav/fix_transaction_failure_handling | Richard van der Hoff | 2017-10-11 | 1 | -2/+3 |
|\ | | | | | log pdu_failures from incoming transactions | ||||
| * | log pdu_failures from incoming transactions | Richard van der Hoff | 2017-10-11 | 1 | -2/+3 |
| | | | | | | | | | | | | | | ... even if we have no EDUs. This appears to have been introduced in 476899295f5fd6cff64799bcbc84cd4bf9005e33. | ||||
* | | Fix typo in invite to group | Erik Johnston | 2017-10-11 | 1 | -1/+1 |
| | | |||||
* | | Merge pull request #2466 from matrix-org/erikj/groups_merged | Erik Johnston | 2017-10-11 | 2 | -1/+892 |
|\ \ | | | | | | | Initial Group Implementation | ||||
| * \ | Merge branch 'develop' into erikj/groups_merged | David Baker | 2017-10-02 | 2 | -69/+78 |
| |\ \ | |||||
| * | | | Add remove room API | Erik Johnston | 2017-09-26 | 2 | -1/+25 |
| | | | | |||||
| * | | | Add bulk group publicised lookup API | Erik Johnston | 2017-08-09 | 2 | -0/+32 |
| | | | | |||||
| * | | | Add update group profile API | Erik Johnston | 2017-07-20 | 1 | -0/+12 |
| | | | | |||||
| * | | | Comments | Erik Johnston | 2017-07-18 | 1 | -1/+1 |
| | | | | |||||
| * | | | Comments | Erik Johnston | 2017-07-18 | 1 | -0/+40 |
| | | | | |||||
| * | | | Fix typos | Erik Johnston | 2017-07-18 | 1 | -2/+2 |
| | | | | |||||
| * | | | Correctly parse query params | Erik Johnston | 2017-07-18 | 1 | -19/+19 |
| | | | | |||||
| * | | | Add client apis | Erik Johnston | 2017-07-18 | 1 | -9/+187 |
| | | | | |||||
| * | | | Comments | Erik Johnston | 2017-07-18 | 1 | -15/+19 |
| | | | | |||||
| * | | | Add local group server support | Erik Johnston | 2017-07-17 | 2 | -0/+121 |
| | | | | |||||
| * | | | Ensure category and role ids are non-null | Erik Johnston | 2017-07-14 | 1 | -0/+24 |
| | | | | |||||
| * | | | Comments | Erik Johnston | 2017-07-13 | 1 | -0/+8 |
| | | | | |||||
| * | | | Add summary APIs to federation | Erik Johnston | 2017-07-13 | 1 | -11/+223 |
| | | | | |||||
| * | | | Add group summary APIs | Erik Johnston | 2017-07-12 | 1 | -0/+17 |
| | | | | |||||
| * | | | Add federation API for adding room to group | Erik Johnston | 2017-07-11 | 1 | -0/+18 |
| | | | | |||||
| * | | | Comment | Erik Johnston | 2017-07-11 | 2 | -0/+26 |
| | | | | |||||
| * | | | Initial group server implementation | Erik Johnston | 2017-07-10 | 2 | -1/+176 |
| | | | | |||||
* | | | | fed server: process PDUs for different rooms in parallel | Richard van der Hoff | 2017-10-09 | 1 | -19/+34 |
| | | | | | | | | | | | | | | | | | | | | With luck, this will give a real-time improvement when there are many rooms and the server ends up calling out to fetch missing events. | ||||
* | | | | Fed server: use a linearizer for ongoing transactions | Richard van der Hoff | 2017-10-09 | 1 | -1/+29 |
| |_|/ |/| | | | | | | | | | | | We don't want to process the same transaction multiple times concurrently, so use a linearizer. | ||||
* | | | fed server: refactor on_incoming_transaction | Richard van der Hoff | 2017-10-09 | 1 | -24/+29 |
| | | | | | | | | | | | | | | | Move as much as possible to after the have_responded check, and reduce the number of times we iterate over the pdu list. | ||||
* | | | Fed server: Move origin-check code to _handle_received_pdu | Richard van der Hoff | 2017-10-09 | 1 | -24/+24 |
| | | | | | | | | | | | | | | | | | | | | | The response-building code expects there to be an entry in the `results` list for each entry in the pdu_list, so the early `continue` was messing this up. That doesn't really matter, because all that the federation client does is log any errors, but it's pretty poor form. | ||||
* | | | Fix up logcontext handling in (federation) TransactionQueue | Richard van der Hoff | 2017-10-06 | 1 | -16/+32 |
| |/ |/| | | | | | | | Avoid using preserve_context_over_function, which has problems with respect to logcontexts. | ||||
* | | Make the spam checker a module | David Baker | 2017-09-26 | 1 | -3/+2 |
| | | |||||
* | | Fix logcontexts in _check_sigs_and_hashes | Richard van der Hoff | 2017-09-20 | 2 | -60/+62 |
| | | |||||
* | | Remove redundant `preserve_fn` | Richard van der Hoff | 2017-09-20 | 1 | -2/+2 |
| | | | | | | | | | | | | preserve_fn is a no-op unless the wrapped function returns a Deferred. verify_json_objects_for_server returns a list, so this is doing nothing. | ||||
* | | PoC for filtering spammy events (#2456) | Richard van der Hoff | 2017-09-19 | 1 | -16/+24 |
|/ | | | Demonstration of how you might add some hooks to filter out spammy events. | ||||
* | Separate federation servlet into different lists | Erik Johnston | 2017-07-05 | 1 | -8/+16 |
| | |||||
* | Remove spurious log lines | Erik Johnston | 2017-06-07 | 1 | -1/+0 |
| | |||||
* | Faster cache for get_joined_hosts | Erik Johnston | 2017-05-25 | 1 | -0/+2 |
| | |||||
* | Make presence use cached users/hosts in room | Erik Johnston | 2017-05-16 | 1 | -1/+1 |
| | |||||
* | Do some logging when one-time-keys get claimed | Richard van der Hoff | 2017-05-09 | 1 | -0/+10 |
| | | | | | might help us figure out if https://github.com/vector-im/riot-web/issues/3868 has happened. | ||||
* | Merge pull request #2190 from matrix-org/erikj/mark_remote_as_back_more | Erik Johnston | 2017-05-05 | 1 | -0/+9 |
|\ | | | | | Always mark remotes as up if we receive a signed request from them | ||||
| * | Use preserve_fn and add logs | Erik Johnston | 2017-05-05 | 1 | -1/+3 |
| | | |||||
| * | Always mark remotes as up if we receive a signed request from them | Erik Johnston | 2017-05-05 | 1 | -0/+7 |
| | | |||||
* | | Add cache for get_current_hosts_in_room | Erik Johnston | 2017-05-02 | 1 | -5/+1 |
|/ | |||||
* | Try harder when sending leave events | Richard van der Hoff | 2017-04-21 | 1 | -1/+19 |
| | | | | | When we're rejecting invites, ignore the backoff data, so that we have a better chance of not getting the room out of sync. | ||||
* | Fix some lies, and other clarifications, in docstrings | Richard van der Hoff | 2017-04-21 | 2 | -2/+68 |
| | | | | | The documentation on get_json has been wrong ever since the very first commit to synapse... | ||||
* | Merge pull request #2115 from matrix-org/erikj/dedupe_federation_repl | Erik Johnston | 2017-04-12 | 2 | -45/+110 |
|\ | | | | | Reduce federation replication traffic | ||||
| * | Comment | Erik Johnston | 2017-04-12 | 1 | -2/+1 |
| | | |||||
| * | Reuse get_interested_parties | Erik Johnston | 2017-04-12 | 1 | -3/+3 |
| | | |||||
| * | Comment | Erik Johnston | 2017-04-11 | 2 | -1/+9 |
| | | |||||
| * | Comments | Erik Johnston | 2017-04-11 | 1 | -7/+7 |
| | | |||||
| * | Move get_interested_remotes back to presence handler | Erik Johnston | 2017-04-11 | 1 | -35/+6 |
| | | |||||
| * | Comments | Erik Johnston | 2017-04-11 | 1 | -1/+14 |
| | | |||||
| * | Reduce federation presence replication traffic | Erik Johnston | 2017-04-10 | 2 | -36/+110 |
| | | | | | | | | | | | | | | | | This is mainly done by moving the calculation of where to send presence updates from the presence handler to the transaction queue, so we only need to send the presence event (and not the destinations) across the replication connection. Before we were duplicating by sending the full state across once per destination. | ||||
* | | Merge pull request #2121 from matrix-org/paul/sent-transactions-metric | Paul Evans | 2017-04-12 | 1 | -0/+3 |
|\ \ | | | | | | | Add a counter metric for successfully-sent transactions | ||||
| * | | Add a counter metric for successfully-sent transactions | Paul "LeoNerd" Evans | 2017-04-11 | 1 | -0/+3 |
| |/ | |||||
* | | Add some comments | Erik Johnston | 2017-04-12 | 1 | -0/+15 |
| | | |||||
* | | Use generators | Erik Johnston | 2017-04-10 | 1 | -2/+2 |
| | | |||||
* | | Dedupe KeyedEdu and Devices federation repl traffic | Erik Johnston | 2017-04-10 | 1 | -6/+9 |
|/ | |||||
* | Rename variable | Erik Johnston | 2017-04-10 | 1 | -7/+7 |
| | |||||
* | Revert to sending the same data type as before | Erik Johnston | 2017-04-10 | 1 | -2/+2 |
| | |||||
* | Change name | Erik Johnston | 2017-04-10 | 1 | -2/+2 |
| | |||||
* | Comments | Erik Johnston | 2017-04-10 | 1 | -4/+6 |
| | |||||
* | Comment | Erik Johnston | 2017-04-07 | 1 | -2/+15 |
| | |||||
* | Add logging | Erik Johnston | 2017-04-07 | 1 | -0/+8 |
| | |||||
* | Fix up federation SendQueue and document types | Erik Johnston | 2017-04-07 | 1 | -26/+220 |
| | |||||
* | Don't double json encode federation replication data | Erik Johnston | 2017-04-05 | 1 | -10/+9 |
| | |||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2017-04-04 | 1 | -2/+6 |
|\ | | | | | | | erikj/repl_tcp_server | ||||
| * | Accept join events from all servers | Richard van der Hoff | 2017-04-03 | 1 | -2/+6 |
| | | | | | | | | | | | | | | Make sure that we accept join events from any server, rather than just the origin server, to make the federation join dance work correctly. (Fixes #1893). | ||||
* | | Make federation send queue take the current position | Erik Johnston | 2017-03-30 | 1 | -15/+25 |
|/ | |||||
* | Bail early if remote wouldn't be retried (#2064) | Erik Johnston | 2017-03-29 | 1 | -2/+8 |
| | | | | | | | | | | * Bail early if remote wouldn't be retried * Don't always return true * Just use get_retry_limiter * Spelling | ||||
* | Merge pull request #2067 from matrix-org/erikj/notify_on_fed | Erik Johnston | 2017-03-29 | 1 | -0/+7 |
|\ | | | | | Notify on new federation traffic | ||||
| * | Notify on new federation traffic | Erik Johnston | 2017-03-27 | 1 | -0/+7 |
| | | |||||
* | | Batch sending of device list pokes | Erik Johnston | 2017-03-24 | 1 | -0/+1 |
|/ | |||||
* | Ignore backoff history for invites, aliases, and roomdirs | Richard van der Hoff | 2017-03-23 | 2 | -3/+10 |
| | | | | | Add a param to the federation client which lets us ignore historical backoff data for federation queries, and set it for a handful of operations. | ||||
* | push federation retry limiter down to matrixfederationclient | Richard van der Hoff | 2017-03-23 | 3 | -141/+109 |
| | | | | | rather than having to instrument everywhere we make a federation call, make the MatrixFederationHttpClient manage the retry limiter. | ||||
* | Fix assertion to stop transaction queue getting wedged | Richard van der Hoff | 2017-03-15 | 1 | -0/+5 |
| | | | | | | | | ... and update some docstrings to correctly reflect the types being used. get_new_device_msgs_for_remote can return a long under some circumstances, which was being stored in last_device_list_stream_id_by_dest, and was then upsetting things on the next loop. | ||||
* | Move FederationServer._handle_new_pdu to FederationHandler | Richard van der Hoff | 2017-03-09 | 1 | -193/+1 |
| | | | | | | | | | | | Unfortunately this significantly increases the size of the already-rather-big FederationHandler, but the code fits more naturally here, and it paves the way for the tighter integration that I need between handling incoming PDUs and doing the join dance. Other than renaming the existing `FederationHandler.on_receive_pdu` to `_process_received_pdu` to make way for it, this just consists of the move, and replacing `self.handler` with `self` and `self` with `self.replication_layer`. | ||||
* | Move sig check out of _handle_new_pdu | Richard van der Hoff | 2017-03-09 | 1 | -12/+36 |
| | | | | | When we receive PDUs via `get_missing_events`, we have already checked their sigs, so there is no need to do it again. | ||||
* | Factor _get_missing_events_for_pdu out of _handle_new_pdu | Richard van der Hoff | 2017-03-09 | 1 | -62/+82 |
| | | | | | This should be functionally identical: it just seeks to improve readability by reducing indentation. | ||||
* | Fix docstring | Richard van der Hoff | 2017-03-09 | 1 | -2/+1 |
| | |||||
* | Fix a race in transaction queue | Richard van der Hoff | 2017-02-20 | 1 | -9/+21 |
| | | | | | | It was theoretically possible for a PDU to get queued and not sent for ages. On closer inspection I think there were bigger problems elsewhere, but we might as well fix this since it's easy. | ||||
* | Correctly raise exceptions for ratelimitng. Ratelimit on 401 | Erik Johnston | 2017-02-01 | 1 | -1/+1 |
| | |||||
* | Better handle 404 response for federation /send/ | Erik Johnston | 2017-01-31 | 1 | -0/+1 |
| | |||||
* | Implement device key caching over federation | Erik Johnston | 2017-01-26 | 4 | -0/+47 |
| | |||||
* | Fix up sending of m.device_list_update edus | Erik Johnston | 2017-01-25 | 1 | -60/+61 |
| | |||||
* | Add basic implementation of local device list changes | Erik Johnston | 2017-01-25 | 1 | -3/+21 |
| | |||||
* | Merge pull request #1824 from matrix-org/erikj/retry_host_log | Erik Johnston | 2017-01-18 | 1 | -1/+1 |
|\ | | | | | Lower the not retrying host log line to debug | ||||
| * | Lower the not retrying host log line to debug | Erik Johnston | 2017-01-17 | 1 | -1/+1 |
| | | |||||
* | | Fix couple of federation state bugs | Erik Johnston | 2017-01-17 | 1 | -2/+4 |
|/ | |||||
* | Name linearizer's for better logs | Erik Johnston | 2017-01-09 | 1 | -2/+2 |
| | |||||
* | do the discard check in the right place to avoid grabbing dependent events | Matthew | 2017-01-07 | 1 | -20/+20 |
| | |||||
* | Discard PDUs from invalid origins due to #1753 in 0.18.[56] v0.18.7-rc1 | Matthew | 2017-01-07 | 1 | -1/+23 |
| | |||||
* | fix comment | Matthew Hodgson | 2017-01-05 | 1 | -1/+17 |
| | |||||
* | limit total timeout for get_missing_events to 10s | Matthew Hodgson | 2017-01-05 | 3 | -3/+11 |
| | |||||
* | Only send events that originate on this server. | Mark Haines | 2017-01-05 | 1 | -0/+12 |
| | | | | | | Or events that are sent via the federation "send_join" API. This should match the behaviour from before v0.18.5 and #1635 landed. | ||||
* | Get the destinations from the state from before the event | Mark Haines | 2017-01-04 | 1 | -8/+9 |
| | | | | Rather than the state after then event. | ||||
* | Send ALL membership events to the server that was affected. | Mark Haines | 2017-01-04 | 1 | -3/+5 |
| | | | | | | Send all membership changes to the server that was affected. This ensures that if the last member of a room on a server was kicked or banned they get told about it. | ||||
* | s/aquire/acquire/g | Mark Haines | 2016-12-30 | 1 | -2/+2 |
| | |||||
* | Add more useful logging when we block fetching events | Mark Haines | 2016-12-30 | 1 | -0/+9 |
| | |||||
* | Remove fallback from get_missing_events. | Mark Haines | 2016-12-30 | 1 | -69/+0 |
| | | | | | | | get_missing_events used to fallback to fetching the missing events individually requesting from every server in the room, one by one.e This could be unacceptably slow, possibly causing #1732 | ||||
* | Add new API appservice specific public room list | Erik Johnston | 2016-12-06 | 3 | -5/+30 |
| | |||||
* | Correctly handle 500's and 429 on federation | Erik Johnston | 2016-11-24 | 1 | -0/+7 |
| | |||||
* | Shuffle receipt handler around so that worker apps don't need to load it | Erik Johnston | 2016-11-23 | 1 | -1/+0 |
| | |||||
* | Explicit federation ack | Erik Johnston | 2016-11-23 | 1 | -2/+11 |
| | |||||
* | Comments | Erik Johnston | 2016-11-21 | 1 | -0/+2 |
| | |||||
* | Add some metrics | Erik Johnston | 2016-11-21 | 1 | -48/+68 |
| | |||||
* | Comments | Erik Johnston | 2016-11-21 | 2 | -0/+29 |
| | |||||
* | Remove explicit calls to send_pdu | Erik Johnston | 2016-11-21 | 2 | -8/+9 |
| | |||||
* | Fix tests | Erik Johnston | 2016-11-21 | 1 | -0/+3 |
| | |||||
* | Store federation stream positions in the database | Erik Johnston | 2016-11-21 | 1 | -4/+17 |
| | |||||
* | Handle sending events and device messages over federation | Erik Johnston | 2016-11-17 | 2 | -7/+63 |
| | |||||
* | Hook up the send queue and create a federation sender worker | Erik Johnston | 2016-11-16 | 1 | -21/+68 |
| | |||||
* | Add initial cut of federation send queue | Erik Johnston | 2016-11-16 | 1 | -0/+174 |
| | |||||
* | Use new federation_sender DI | Erik Johnston | 2016-11-16 | 2 | -49/+10 |
| | |||||
* | Add transaction queue and transport layer to DI | Erik Johnston | 2016-11-16 | 4 | -10/+6 |
| | |||||
* | Move logic into transaction_queue | Erik Johnston | 2016-11-16 | 3 | -19/+18 |
| | |||||
* | Rename transaction queue functions to send_* | Erik Johnston | 2016-11-16 | 2 | -12/+12 |
| | |||||
* | Time out typing over federation | Erik Johnston | 2016-09-23 | 1 | -2/+0 |
| | |||||
* | Support filtering remote room lists | Erik Johnston | 2016-09-16 | 2 | -3/+9 |
| | |||||
* | Pass since/from parameters over federation | Erik Johnston | 2016-09-15 | 3 | -21/+20 |
| | |||||
* | Merge pull request #1110 from matrix-org/markjh/e2e_timeout | Mark Haines | 2016-09-13 | 2 | -6/+12 |
|\ | | | | | Add a timeout parameter for end2end key queries. | ||||
| * | Add a timeout parameter for end2end key queries. | Mark Haines | 2016-09-12 | 2 | -6/+12 |
| | | | | | | | | | | | | | | | | | | | | Add a timeout parameter for controlling how long synapse will wait for responses from remote servers. For servers that fail include how they failed to make it easier to debug. Fetch keys from different servers in parallel rather than in series. Set the default timeout to 10s. | ||||
* | | Fix backfill when cannot find an event. | Erik Johnston | 2016-09-12 | 1 | -1/+1 |
|/ | | | | `get_pdu` can succeed but return None. | ||||
* | Fix incorrect attribute name | Erik Johnston | 2016-09-09 | 1 | -1/+1 |
| | |||||
* | Comment | Erik Johnston | 2016-09-09 | 1 | -0/+1 |
| |