summary refs log tree commit diff
path: root/contrib/cmdclient/console.py (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-09-29Move Measure calls into `resolve_events_with_store`Richard van der Hoff1-32/+31
2020-09-29Expose a `get_resource_usage` method in `Measure`Richard van der Hoff1-10/+21
2020-09-29Move `resolve_events_with_store` into StateResolutionHandlerRichard van der Hoff2-50/+55
2020-09-29Discard an empty upload_name before persisting an uploaded file (#7905)Will Hunt3-3/+9
2020-09-29Don't table scan events on worker startup (#8419)Erik Johnston3-1/+44
* Fix table scan of events on worker startup. This happened because we assumed "new" writers had an initial stream position of 0, so the replication code tried to fetch all events written by the instance between 0 and the current position. Instead, set the initial position of new writers to the current persisted up to position, on the assumption that new writers won't have written anything before that point. * Consider old writers coming back as "new". Otherwise we'd try and fetch entries between the old stale token and the current position, even though it won't have written any rows. Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2020-09-29Mypy fixes for `synapse.handlers.federation` (#8422)Richard van der Hoff6-11/+19
For some reason, an apparently unrelated PR upset mypy about this module. Here are a number of little fixes.
2020-09-29Add support for running Complement against the local checkout (#8317)Andrew Morgan2-0/+23
This PR adds a script that: * Builds the local Synapse checkout using our existing `docker/Dockerfile` image. * Downloads [Complement](https://github.com/matrix-org/complement/)'s source code. * Builds the [Synapse.Dockerfile](https://github.com/matrix-org/complement/blob/master/dockerfiles/Synapse.Dockerfile) using the above dockerfile as a base. * Builds and runs Complement against it. This set up differs slightly from [that of the dendrite repo](https://github.com/matrix-org/dendrite/blob/master/build/scripts/complement.sh) (`complement.sh`, `Complement.Dockerfile`), which instead stores a separate, but slightly modified, dockerfile in Dendrite's repo rather than running the one stored in Complement's repo. That synapse equivalent to that dockerfile (`Synapse.Dockerfile`) in Complement's repo is just based on top of `matrixdotorg/synapse:latest`, which we opt to build here locally. Thus copying over the files from Complement's repo wouldn't change any functionality, and would result in two instances of the same files. So just using the dockerfile in Complement's repo was decided upon instead.
2020-09-29Filter out appservices from mau count (#8404)Will Hunt3-2/+25
This is an attempt to fix #8403.
2020-09-29Only assert valid next_link params when provided (#8417)Andrew Morgan3-6/+16
Broken in https://github.com/matrix-org/synapse/pull/8275 and has yet to be put in a release. Fixes https://github.com/matrix-org/synapse/issues/8418. `next_link` is an optional parameter. However, we were checking whether the `next_link` param was valid, even if it wasn't provided. In that case, `next_link` was `None`, which would clearly not be a valid URL. This would prevent password reset and other operations if `next_link` was not provided, and the `next_link_domain_whitelist` config option was set.
2020-09-29Add metrics to track success/otherwise of replication requests (#8406)Richard van der Hoff2-12/+29
One hope is that this might provide some insights into #3365.
2020-09-29Fix handling of connection timeouts in outgoing http requests (#8400)Richard van der Hoff9-98/+311
* Remove `on_timeout_cancel` from `timeout_deferred` The `on_timeout_cancel` param to `timeout_deferred` wasn't always called on a timeout (in particular if the canceller raised an exception), so it was unreliable. It was also only used in one place, and to be honest it's easier to do what it does a different way. * Fix handling of connection timeouts in outgoing http requests Turns out that if we get a timeout during connection, then a different exception is raised, which wasn't always handled correctly. To fix it, catch the exception in SimpleHttpClient and turn it into a RequestTimedOutError (which is already a documented exception). Also add a description to RequestTimedOutError so that we can see which stage it failed at. * Fix incorrect handling of timeouts reading federation responses This was trapping the wrong sort of TimeoutError, so was never being hit. The effect was relatively minor, but we should fix this so that it does the expected thing. * Fix inconsistent