Skip to content
Snippets Groups Projects
  1. Apr 04, 2020
    • Brendan Abolivier's avatar
      Server notices: Dissociate room creation/lookup from invite (#7199) · d73bf18d
      Brendan Abolivier authored
      Fixes #6815
      
      Before figuring out whether we should alert a user on MAU, we call get_notice_room_for_user to get some info on the existing server notices room for this user. This function, if the room doesn't exist, creates it and invites the user in it. This means that, if we decide later that no server notice is needed, the user gets invited in a room with no message in it. This happens at every restart of the server, since the room ID returned by get_notice_room_for_user is cached.
      
      This PR fixes that by moving the inviting bit to a dedicated function, that's only called when the server actually needs to send a notice to the user. A potential issue with this approach is that the room that's created by get_notice_room_for_user doesn't match how that same function looks for an existing room (i.e. it creates a room that doesn't have an invite or a join for the current user in it, so it could lead to a new room being created each time a user syncs), but I'm not sure this is a problem given it's cached until the server restarts, so that function won't run very often.
      
      It also renames get_notice_room_for_user into get_or_create_notice_room_for_user to make what it does clearer.
      d73bf18d
  2. Apr 03, 2020
  3. Apr 01, 2020
  4. Mar 31, 2020
  5. Mar 30, 2020
  6. Mar 27, 2020
  7. Mar 26, 2020
  8. Mar 25, 2020
    • Erik Johnston's avatar
      Move catchup of replication streams to worker. (#7024) · 4cff617d
      Erik Johnston authored
      This changes the replication protocol so that the server does not send down `RDATA` for rows that happened before the client connected. Instead, the server will send a `POSITION` and clients then query the database (or master out of band) to get up to date.
      4cff617d
  9. Mar 24, 2020
    • Richard van der Hoff's avatar
      Remove spurious "name" parameter to `default_config` · 28d9d6e8
      Richard van der Hoff authored
      this is never set to anything other than "test", and is a source of unnecessary
      boilerplate.
      28d9d6e8
    • Richard van der Hoff's avatar
      Clean up some LoggingContext stuff (#7120) · 39230d21
      Richard van der Hoff authored
      * Pull Sentinel out of LoggingContext
      
      ... and drop a few unnecessary references to it
      
      * Factor out LoggingContext.current_context
      
      move `current_context` and `set_context` out to top-level functions.
      
      Mostly this means that I can more easily trace what's actually referring to
      LoggingContext, but I think it's generally neater.
      
      * move copy-to-parent into `stop`
      
      this really just makes `start` and `stop` more symetric. It also means that it
      behaves correctly if you manually `set_log_context` rather than using the
      context manager.
      
      * Replace `LoggingContext.alive` with `finished`
      
      Turn `alive` into `finished` and make it a bit better defined.
      39230d21
  10. Mar 23, 2020
  11. Mar 20, 2020
  12. Mar 18, 2020
    • Erik Johnston's avatar
      Improve get auth chain difference algorithm. (#7095) · 4a17a647
      Erik Johnston authored
      It was originally implemented by pulling the full auth chain of all
      state sets out of the database and doing set comparison. However, that
      can take a lot work if the state and auth chains are large.
      
      Instead, lets try and fetch the auth chains at the same time and
      calculate the difference on the fly, allowing us to bail early if all
      the auth chains converge. Assuming that the auth chains do converge more
      often than not, this should improve performance. Hopefully.
      4a17a647
  13. Mar 17, 2020
  14. Mar 09, 2020
  15. Mar 08, 2020
  16. Mar 06, 2020
  17. Mar 04, 2020
  18. Mar 03, 2020
  19. Mar 02, 2020
Loading