summary refs log tree commit diff
path: root/synapse/federation/sender/transaction_manager.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Additional constants for EDU types. (#12884)Patrick Cloke2022-05-271-1/+5
| | | Instead of hard-coding strings in many places.
* Remove `HomeServer.get_datastore()` (#12031)Richard van der Hoff2022-02-231-1/+1
| | | | | | | The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733
* Debug for device lists updates (#11760)David Robertson2022-01-201-0/+12
| | | | | | | | | | | | | | | | | | Debug for #8631. I'm having a hard time tracking down what's going wrong in that issue. In the reported example, I could see server A sending federation traffic to server B and all was well. Yet B reports out-of-sync device updates from A. I couldn't see what was _in_ the events being sent from A to B. So I have added some crude logging to track - when we have updates to send to a remote HS - the edus we actually accumulate to send - when a federation transaction includes a device list update edu - when such an EDU is received This is a bit of a sledgehammer.
* Annotate `log_function` decorator (#10943)reivilibre2021-10-271-1/+0
| | | Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
* Convert Transaction and Edu object to attrs (#10542)Patrick Cloke2021-08-061-4/+5
| | | | | Instead of wrapping the JSON into an object, this creates concrete instances for Transaction and Edu. This allows for improved type hints and simplified code.
* remove `HomeServer.get_config` (#9815)Richard van der Hoff2021-04-141-1/+1
| | | | Every single time I want to access the config object, I have to remember whether or not we use `get_config`. Let's just get rid of it.
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-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>`
* Don't go into federation catch up mode so easily (#9561)Erik Johnston2021-03-151-34/+14
| | | | | | | | | | Federation catch up mode is very inefficient if the number of events that the remote server has missed is small, since handling gaps can be very expensive, c.f. #9492. Instead of going into catch up mode whenever we see an error, we instead do so only if we've backed off from trying the remote for more than an hour (the assumption being that in such a case it is more than a transient failure).
* Replace `last_*_pdu_age` metrics with timestamps (#9540)Richard van der Hoff2021-03-041-6/+5
| | | | | | | | Following the advice at https://prometheus.io/docs/practices/instrumentation/#timestamps-not-time-since, it's preferable to export unix timestamps, not ages. There doesn't seem to be any particular naming convention for timestamp metrics.
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-1/+4
| | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
* Add prometheus metrics to track federation delays (#8430)Richard van der Hoff2020-10-011-0/+22
| | | | | Add a pair of federation metrics to track the delays in sending PDUs to/from particular servers.
* Stop sub-classing object (#8249)Patrick Cloke2020-09-041-1/+1
|
* Remove obsolete order field in `send_new_transaction` (#8245)reivilibre2020-09-031-13/+13
| | | Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Be stricter about JSON that is accepted by Synapse (#8106)Patrick Cloke2020-08-191-3/+2
|
* Fix typing for notifier (#8064)Erik Johnston2020-08-121-2/+5
|
* Remove obsolete comment.Olivier Wilkinson (reivilibre)2020-07-161-2/+0
| | | | | | | | It was correct at the time of our friend Jorik writing it (checking git blame), but the world has moved now and it is no longer a generator. Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
* Fix catchup-on-reconnect for the Federation Stream (#7374)Richard van der Hoff2020-05-051-2/+4
| | | | looks like we managed to break this during the refactorathon.
* Add typing to synapse.federation.sender (#6871)Erik Johnston2020-02-071-7/+9
|
* Clean up newline quote marks around the codebase (#6362)Andrew Morgan2019-11-211-2/+2
|
* Remove usage of deprecated logger.warn method from codebase (#6271)Andrew Morgan2019-10-311-2/+2
| | | Replace every instance of `logger.warn` with `logger.warning` as the former is deprecated.
* use access methods (duh..)Jorik Schellekens2019-09-051-1/+3
| | | Co-Authored-By: Erik Johnston <erik@matrix.org>
* Link the send loop with the edus contextsJorik Schellekens2019-09-051-3/+8
| | | | | | The contexts were being filtered too early so the send loop wasn't being linked to them unless the destination was whitelisted.
* Propagate opentracing contexts through EDUs (#5852)Jorik Schellekens2019-08-221-73/+97
| | | | | Propagate opentracing contexts through EDUs Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Replace returnValue with return (#5736)Amber Brown2019-07-231-1/+1
|
* remove dead transaction persist code (#5622)Richard van der Hoff2019-07-051-9/+0
| | | | this hasn't done anything for years
* Run Black. (#5482)Amber Brown2019-06-201-20/+18
|
* Rename and move the classesRichard van der Hoff2019-03-131-0/+147