Skip to content
Snippets Groups Projects
  1. Mar 18, 2021
    • Erik Johnston's avatar
      Make federation catchup send last event from any server. (#9640) · dd71eb0f
      Erik Johnston authored
      Currently federation catchup will send the last *local* event that we
      failed to send to the remote. This can cause issues for large rooms
      where lots of servers have sent events while the remote server was down,
      as when it comes back up again it'll be flooded with events from various
      points in the DAG.
      
      Instead, let's make it so that all the servers send the most recent
      events, even if its not theirs. The remote should deduplicate the
      events, so there shouldn't be much overhead in doing this.
      Alternatively, the servers could only send local events if they were
      also extremities and hope that the other server will send the event
      over, but that is a bit risky.
      Unverified
      dd71eb0f
  2. Mar 15, 2021
    • Erik Johnston's avatar
      Don't go into federation catch up mode so easily (#9561) · 026503fa
      Erik Johnston authored
      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).
      Unverified
      026503fa
  3. Feb 16, 2021
  4. Dec 30, 2020
    • Andrew Morgan's avatar
      Fix RoomDirectoryFederationTests and make them actually run (#8998) · 168ba00d
      Andrew Morgan authored
      The `RoomDirectoryFederationTests` tests were not being run unless explicitly called as an `__init__.py` file was not present in `tests/federation/transport/`. Thus the folder was not a python module, and `trial` did not look inside for any test cases to run. This was found while working on #6739.
      
      This PR adds a `__init__.py` and also fixes the test in a couple ways:
      
      - Switch to subclassing `unittest.FederatingHomeserverTestCase` instead, which sets up federation endpoints for us.
      - Supply a `federation_auth_origin` to `make_request` in order to more act like the request is coming from another server, instead of just an unauthenicated client requesting a federation endpoint.
      
      I found that the second point makes no difference to the test passing, but felt like the right thing to do if we're testing over federation.
      Unverified
      168ba00d
  5. Dec 15, 2020
  6. Nov 16, 2020
  7. Sep 18, 2020
  8. Sep 15, 2020
  9. Sep 10, 2020
  10. Sep 08, 2020
  11. Sep 07, 2020
  12. Sep 04, 2020
  13. Aug 27, 2020
  14. Aug 13, 2020
  15. Jul 30, 2020
  16. Jul 28, 2020
  17. Jul 24, 2020
  18. Jun 10, 2020
  19. Jun 04, 2020
  20. May 22, 2020
    • Erik Johnston's avatar
      Add ability to wait for replication streams (#7542) · 1531b214
      Erik Johnston authored
      The idea here is that if an instance persists an event via the replication HTTP API it can return before we receive that event over replication, which can lead to races where code assumes that persisting an event immediately updates various caches (e.g. current state of the room).
      
      Most of Synapse doesn't hit such races, so we don't do the waiting automagically, instead we do so where necessary to avoid unnecessary delays. We may decide to change our minds here if it turns out there are a lot of subtle races going on.
      
      People probably want to look at this commit by commit.
      Unverified
      1531b214
  21. Apr 03, 2020
    • Richard van der Hoff's avatar
      Fix device list update stream ids going backward (#7158) · daa1ac89
      Richard van der Hoff authored
      Occasionally we could get a federation device list update transaction which
      looked like:
      
      ```
      [
          {'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D2', 'prev_id': [], 'stream_id': 12, 'deleted': True}},
          {'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D1', 'prev_id': [12], 'stream_id': 11, 'deleted': True}},
          {'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D3', 'prev_id': [11], 'stream_id': 13, 'deleted': True}}
      ]
      ```
      
      Having `stream_ids` which are lower than `prev_ids` looks odd. It might work
      (I'm not actually sure), but in any case it doesn't seem like a reasonable
      thing to expect other implementations to support.
      Unverified
      daa1ac89
  22. Mar 30, 2020
  23. Mar 27, 2020
  24. Mar 24, 2020
  25. Feb 21, 2020
  26. Feb 07, 2020
  27. Dec 04, 2019
  28. Nov 27, 2019
  29. Aug 20, 2019
  30. Jul 29, 2019
  31. Jun 20, 2019
  32. May 29, 2019
  33. May 10, 2019
  34. Mar 20, 2019
  35. Aug 10, 2018
  36. Jul 09, 2018
  37. Jul 04, 2018
  38. Jan 26, 2016
  39. Jan 07, 2016
Loading