Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Allow config of the backoff algorithm for the federation client. (#15754) | Mathieu Velten | 2023-08-03 | 1 | -13/+16 |
| | | | | | | | | | | | Adds three new configuration variables: * destination_min_retry_interval is identical to before (10mn). * destination_retry_multiplier is now 2 instead of 5, the maximum value will be reached slower. * destination_max_retry_interval is one day instead of (essentially) infinity. Capping this will cause destinations to continue to be retried sometimes instead of being lost forever. The previous value was 2 ^ 62 milliseconds. | ||||
* | Refactor MSC3030 `/timestamp_to_event` to move away from our snowflake pull ↵ | Eric Eastwood | 2022-10-26 | 1 | -1/+1 |
| | | | | | | | | | from `destination` pattern (#14096) 1. `federation_client.timestamp_to_event(...)` now handles all `destination` looping and uses our generic `_try_destination_list(...)` helper. 2. Consistently handling `NotRetryingDestination` and `FederationDeniedError` across `get_pdu` , backfill, and the generic `_try_destination_list` which is used for many places we use this pattern. 3. `get_pdu(...)` now returns `PulledPduInfo` so we know which `destination` we ended up pulling the PDU from | ||||
* | Fix `RetryDestinationLimiter` re-starting finished log contexts (#12803) | Sean Quah | 2022-05-19 | 1 | -2/+2 |
| | | | | Signed-off-by: Sean Quah <seanq@matrix.org> | ||||
* | Immediately retry any requests that have backed off when a server comes back ↵ | Erik Johnston | 2022-05-10 | 1 | -1/+23 |
| | | | | | online. (#12500) Otherwise it can take up to a minute for any in-flight `/send` requests to be retried. | ||||
* | Bump `black` and `click` versions (#12320) | David Robertson | 2022-03-29 | 1 | -1/+1 |
| | |||||
* | Add types to synapse.util. (#10601) | reivilibre | 2021-09-10 | 1 | -27/+42 |
| | |||||
* | Don't hammer the database for destination retry timings every ~5mins (#10036) | Erik Johnston | 2021-05-21 | 1 | -5/+3 |
| | |||||
* | 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>` | ||||
* | Tell Black to format code for Python 3.5 (#8664) | Dan Callahan | 2020-10-27 | 1 | -1/+1 |
| | | | | | | | | This allows trailing commas in multi-line arg lists. Minor, but we might as well keep our formatting current with regard to our minimum supported Python version. Signed-off-by: Dan Callahan <danc@element.io> | ||||
* | Simplify super() calls to Python 3 syntax. (#8344) | Patrick Cloke | 2020-09-18 | 1 | -1/+1 |
| | | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py | ||||
* | Stop sub-classing object (#8249) | Patrick Cloke | 2020-09-04 | 1 | -1/+1 |
| | |||||
* | Convert some util functions to async (#8035) | Patrick Cloke | 2020-08-06 | 1 | -10/+6 |
| | |||||
* | Fix some spelling mistakes / typos. (#7811) | Patrick Cloke | 2020-07-09 | 1 | -2/+2 |
| | |||||
* | Fix errors storing large retry intervals. | Erik Johnston | 2019-10-02 | 1 | -1/+1 |
| | | | | | | | | | We have set the max retry interval to a value larger than a postgres or sqlite int can hold, which caused exceptions when updating the destinations table. To fix postgres we need to change the column to a bigint, and for sqlite we lower the max interval to 2**62 (which is still incredibly long). | ||||
* | Add 'failure_ts' column to 'destinations' table (#6016) | Richard van der Hoff | 2019-09-17 | 1 | -1/+15 |
| | | | | Track the time that a server started failing at, for general analysis purposes. | ||||
* | Remove the cap on federation retry interval. (#6026) | Richard van der Hoff | 2019-09-12 | 1 | -2/+2 |
| | | | | | | Essentially the intention here is to end up blacklisting servers which never respond to federation requests. Fixes https://github.com/matrix-org/synapse/issues/5113. | ||||
* | Fix bug in calculating the federation retry backoff period (#6025) | Richard van der Hoff | 2019-09-12 | 1 | -2/+3 |
| | | | | This was intended to introduce an element of jitter; instead it gave you a 30/60 chance of resetting to zero. | ||||
* | Clean up some code in the retry logic (#6017) | Richard van der Hoff | 2019-09-11 | 1 | -16/+13 |
| | | | | * remove some unused code * make things which were constants into constants for efficiency and clarity | ||||
* | Replace returnValue with return (#5736) | Amber Brown | 2019-07-23 | 1 | -9/+7 |
| | |||||
* | Move logging utilities out of the side drawer of util/ and into logging/ (#5606) | Amber Brown | 2019-07-04 | 1 | -2/+2 |
| | |||||
* | Call RetryLimiter correctly (#5340) | Richard van der Hoff | 2019-06-04 | 1 | -1/+6 |
| | | | Fixes a regression introduced in #5335. | ||||
* | Avoid rapidly backing-off a server if we ignore the retry interval | Richard van der Hoff | 2019-06-03 | 1 | -23/+37 |
| | |||||
* | Improve the logging when handling a federation transaction (#3904) | Richard van der Hoff | 2018-09-19 | 1 | -1/+1 |
| | | | | | | | | | | Let's try to rationalise the logging that happens when we are processing an incoming transaction, to make it easier to figure out what is going wrong when they take ages. In particular: - make everything start with a [room_id event_id] prefix - make sure we log a warning when catching exceptions rather than just turning them into other, more cryptic, exceptions. | ||||
* | run isort | Amber Brown | 2018-07-09 | 1 | -5/+4 |
| | |||||
* | 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. | ||||
* | Add federation_domain_whitelist option (#2820) | Matthew Hodgson | 2018-01-22 | 1 | -0/+12 |
| | | | | | | 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 | ||||
* | replace 'except:' with 'except Exception:' | Richard van der Hoff | 2017-10-23 | 1 | -1/+1 |
| | | | | what could possibly go wrong | ||||
* | Merge pull request #2050 from matrix-org/rav/federation_backoff | Richard van der Hoff | 2017-03-23 | 1 | -4/+25 |
|\ | | | | | push federation retry limiter down to matrixfederationclient | ||||
| * | Ignore backoff history for invites, aliases, and roomdirs | Richard van der Hoff | 2017-03-23 | 1 | -2/+11 |
| | | | | | | | | | | 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 | 1 | -2/+14 |
| | | | | | | | | | | rather than having to instrument everywhere we make a federation call, make the MatrixFederationHttpClient manage the retry limiter. | ||||
* | | Fix a couple of logcontext leaks | Richard van der Hoff | 2017-03-23 | 1 | -2/+3 |
|/ | | | | | Use preserve_fn to correctly manage the logcontexts around things we don't want to yield on. | ||||
* | Correctly raise exceptions for ratelimitng. Ratelimit on 401 | Erik Johnston | 2017-02-01 | 1 | -3/+5 |
| | |||||
* | Remove explicit < 400 check as apparently this is confusing | Erik Johnston | 2017-01-31 | 1 | -3/+1 |
| | |||||
* | Comment | Erik Johnston | 2017-01-31 | 1 | -0/+2 |
| | |||||
* | Comment | Erik Johnston | 2017-01-31 | 1 | -0/+4 |
| | |||||
* | Better handle 404 response for federation /send/ | Erik Johnston | 2017-01-31 | 1 | -2/+13 |
| | |||||
* | Use correct var | Erik Johnston | 2016-11-24 | 1 | -1/+1 |
| | |||||
* | Correctly handle 500's and 429 on federation | Erik Johnston | 2016-11-24 | 1 | -1/+1 |
| | |||||
* | Invalidate retry cache in both directions | Erik Johnston | 2016-11-22 | 1 | -9/+12 |
| | |||||
* | Fix retry utils to check if the exception is a subclass of CME | Mark Haines | 2016-07-28 | 1 | -1/+1 |
| | |||||
* | copyrights | Matthew Hodgson | 2016-01-07 | 1 | -1/+1 |
| | |||||
* | Retry dead servers a lot less often | Erik Johnston | 2015-11-02 | 1 | -2/+5 |
| | |||||
* | Make work in both Maria and SQLite. Fix tests | Erik Johnston | 2015-04-01 | 1 | -1/+1 |
| | |||||
* | Remove unused import | Erik Johnston | 2015-02-18 | 1 | -2/+0 |
| | |||||
* | Remove spurious comma. Remove temp run_on_reactor | Erik Johnston | 2015-02-18 | 1 | -2/+1 |
| | |||||
* | Temporarily add a run_on_reactor() call | Erik Johnston | 2015-02-18 | 1 | -0/+3 |
| | |||||
* | s/self._clock/self.clock/ | Erik Johnston | 2015-02-18 | 1 | -1/+1 |
| | |||||
* | More docs | Erik Johnston | 2015-02-18 | 1 | -1/+5 |
| | |||||
* | Docs. | Erik Johnston | 2015-02-18 | 1 | -1/+33 |
| | |||||
* | Try to only back off if we think we failed to connect to the remote | Erik Johnston | 2015-02-17 | 1 | -2/+8 |
| | |||||
* | Only update destination_retry_timings if we have succeeded when retrying | Erik Johnston | 2015-02-17 | 1 | -0/+3 |
| | |||||
* | Remove spurious self | Erik Johnston | 2015-02-17 | 1 | -1/+1 |
| | |||||
* | Add per server retry limiting. | Erik Johnston | 2015-02-17 | 1 | -0/+108 |
Factor out the pre destination retry logic from TransactionQueue so it can be reused in both get_pdu and crypto.keyring |