Commit Graph

169 Commits

Author SHA1 Message Date
Erik Johnston
47d3ff4cf8 Don't send failure to self 2015-02-18 11:30:37 +00:00
Erik Johnston
e482541e1d Fix pyflakes 2015-02-18 10:44:22 +00:00
Erik Johnston
1be67eca8a Merge branch 'keyclient_retry_scheme' of github.com:matrix-org/synapse into develop 2015-02-18 10:34:40 +00:00
Erik Johnston
fe672a04f7 Merge pull request #77 from matrix-org/failures
Failures
2015-02-18 10:29:29 +00:00
Erik Johnston
08f804208b Merge pull request #79 from matrix-org/get_pdu_limiting
Get pdu limiting
2015-02-18 10:29:10 +00:00
Erik Johnston
ec847059f3 Rename _fail_fetch_pdu_cache to _get_pdu_cache 2015-02-18 10:14:10 +00:00
Erik Johnston
9371019133 Try to only back off if we think we failed to connect to the remote 2015-02-17 18:13:34 +00:00
Erik Johnston
2b8f1a956c Add per server retry limiting.
Factor out the pre destination retry logic from TransactionQueue so it
can be reused in both get_pdu and crypto.keyring
2015-02-17 17:20:56 +00:00
Erik Johnston
676e8ee78a Remove debug raise 2015-02-17 15:22:45 +00:00
Erik Johnston
fa6c93bd26 Merge branch 'consumeErrors' of github.com:matrix-org/synapse into develop 2015-02-17 15:18:17 +00:00
Erik Johnston
c02da58a9d Merge branch 'develop' of github.com:matrix-org/synapse into failures 2015-02-17 15:15:07 +00:00
Erik Johnston
659ead082f Format the response of transaction request in a nicer way 2015-02-17 15:11:44 +00:00
Erik Johnston
c82e26ad4b Actually respond with JSON to incoming transaction 2015-02-17 13:24:13 +00:00
Erik Johnston
02bfa889de Handle recieving failures in transactions 2015-02-17 13:13:14 +00:00
Erik Johnston
72a4de2ce6 Use consumeErrors=True on all DeferredLists.
This is so that the DeferredLists actually consume the error instead of
propogating down the non-existent errback chain. This should reduce the
number of unhandled errors we are seeing.
2015-02-17 10:07:01 +00:00
Erik Johnston
0194e71e99 Merge branch 'develop' of github.com:matrix-org/synapse into get_pdu_limiting 2015-02-17 09:48:23 +00:00
Erik Johnston
baa5b9a975 Cache results of get_pdu. 2015-02-16 18:02:39 +00:00
Erik Johnston
91fc5eef1d Mark old events as outliers.
This is to fix the issue where if a remote server sends an event
that references a really "old" event, then the local server will pull
that in and send to all clients.

We decide if an event is old if its depth is less than the minimum depth
of the room.
2015-02-16 14:27:40 +00:00
Erik Johnston
6138584651 Don't return anything from _handle_new_pdu, since we ignore the return value anyway 2015-02-16 14:08:02 +00:00
Erik Johnston
789251afa7 Fix logging 2015-02-12 19:29:43 +00:00
Erik Johnston
58d848adc0 Parrellize fetching of events 2015-02-12 18:35:36 +00:00
Erik Johnston
963256638d Correctly handle all the places that can throw exceptions 2015-02-12 18:17:11 +00:00
Erik Johnston
c52e8d395b Merge pull request #61 from matrix-org/timeout-federation-requests
Timeout federation requests
2015-02-11 17:10:33 +00:00
Erik Johnston
ef276e8770 Fix so timing out connections to actually work. 2015-02-11 16:48:05 +00:00
Erik Johnston
ddb816cf60 Don't unfreeze when using FreezeEvent.get_dict, as we are using a JSONEncoder that understands FrozenDict 2015-02-11 15:44:28 +00:00
Erik Johnston
4ebbaf0d43 Blunty replace json with simplejson 2015-02-11 14:23:10 +00:00
Erik Johnston
c8e1da930d Log all the exits from _attempt_new_transaction 2015-02-10 17:30:46 +00:00
Erik Johnston
697ab75a34 Sign auth_chains when returned by /state/ requests 2015-02-10 15:46:24 +00:00
Erik Johnston
e9c85a4d5a Connection errors in twisted aren't RuntimeErrors 2015-02-05 13:50:15 +00:00
Erik Johnston
e1515c3e91 Pass through list of room hosts from room alias query to federation so that it can retry against different room hosts 2015-02-05 13:44:42 +00:00
Erik Johnston
ae46f10fc5 Apply sanity to the transport client interface. Convert 'make_join' and 'send_join' to accept iterables of destinations 2015-02-04 16:28:12 +00:00
Erik Johnston
ff78eded01 Retry make_join 2015-02-04 13:55:10 +00:00
Erik Johnston
3c39f42a05 New line 2015-02-03 16:14:19 +00:00
Erik Johnston
9bace3a367 Actually, the old prune_event function was non-deterministic, so no point keeping it around :( 2015-02-03 15:32:17 +00:00
Erik Johnston
8dae5c8108 Remove unused imports 2015-02-03 15:01:12 +00:00
Erik Johnston
7b810e136e Add new FederationBase 2015-02-03 15:00:42 +00:00
Erik Johnston
0dd3aea319 Keep around the old (buggy) version of the prune_event function so that we can use it to check signatures for events on old servers 2015-02-03 14:58:30 +00:00
Erik Johnston
0f48e22ef6 PEP8 2015-02-03 10:43:29 +00:00
Erik Johnston
40c6fe1b81 Don't bother requesting PDUs with bad signatures from the same server 2015-02-02 17:06:37 +00:00
Erik Johnston
941f59101b Don't fail an entire request if one of the returned events fails a signature check. If an event does fail a signature check, look in the local database and request it from the originator. 2015-02-02 16:56:01 +00:00
Erik Johnston
776ac820f9 Briefly doc structure of query_auth API. 2015-01-30 15:58:28 +00:00
Erik Johnston
a70a801184 Fix bug where we superfluously asked for current state. Change API of /query_auth/ so that we don't duplicate events in the response. 2015-01-30 13:34:01 +00:00
Erik Johnston
c1d860870b Fix regression where we no longer correctly handled the case of gaps in our event graph 2015-01-30 10:48:47 +00:00
Erik Johnston
78015948a7 Initial implementation of auth conflict resolution 2015-01-29 16:52:33 +00:00
Erik Johnston
0ef5bfd6a9 Start implementing auth conflict res 2015-01-28 16:16:53 +00:00
Erik Johnston
c92d64a6c3 Make it the responsibility of the replication layer to check signature and hashes. 2015-01-26 14:33:11 +00:00
Erik Johnston
7b88619241 Split up replication_layer module into client, server and transaction queue 2015-01-26 10:45:24 +00:00
Erik Johnston
ca65a9d03e Split out TransactionQueue from replication layer 2015-01-22 16:37:08 +00:00
Mark Haines
5fed042640 Finish renaming "context" to "room_id" in federation codebase 2015-01-16 19:01:03 +00:00
Mark Haines
2408c4b0a4 Fold _do_request_for_transaction into the methods that called it since it was a trivial wrapper around client.get_json 2015-01-16 19:01:03 +00:00