Skip to content
Snippets Groups Projects
  1. Sep 29, 2021
  2. Sep 28, 2021
    • Hillery Shay's avatar
      Update utility code to handle C implementations of frozendict (#10902) · 0f007fe0
      Hillery Shay authored
      * update _handle_frozendict to work with c implementations of frozen dict
      
      * add changelog
      
      * add clarifying comment to _handle_frozendict
      0f007fe0
    • Richard van der Hoff's avatar
      Drop backwards-compatibility support for "outlier" (#10903) · 8aaa4b7b
      Richard van der Hoff authored
      Before Synapse 1.31 (#9411), we relied on `outlier` being stored in the
      `internal_metadata` column. We can now assume nobody will roll back their
      deployment that far and drop the legacy support.
      8aaa4b7b
    • Richard van der Hoff's avatar
      Inline `_check_event_auth` for outliers (#10926) · 2622b28c
      Richard van der Hoff authored
      * Inline `_check_event_auth` for outliers
      
      When we are persisting an outlier, most of `_check_event_auth` is redundant:
      
       * `_update_auth_events_and_context_for_auth` does nothing, because the
         `input_auth_events` are (now) exactly the event's auth_events,
         which means that `missing_auth` is empty.
      
       * we don't care about soft-fail, kicking guest users or `send_on_behalf_of`
         for outliers
      
      ... so the only thing that matters is the auth itself, so let's just do that.
      
      * `_auth_and_persist_fetched_events_inner`: de-async `prep`
      
      `prep` no longer calls any `async` methods, so let's make it synchronous.
      
      * Simplify `_check_event_auth`
      
      We no longer need to support outliers here, which makes things rather simpler.
      
      * changelog
      
      * lint
      2622b28c
    • Patrick Cloke's avatar
      Clean-up type hints in server config (#10915) · eb2c7e51
      Patrick Cloke authored
      By using attrs instead of dicts to store configuration.
      
      Also updates some of the attrs classes to use proper type
      hints and auto_attribs.
      eb2c7e51
    • Patrick Cloke's avatar
      Only do restricted join rules signature checks for room versions 8/9. (#10927) · c3ccad77
      Patrick Cloke authored
      Otherwise the presence of a (bogus, unused) field could cause
      auth checks to fail.
      c3ccad77
    • Erik Johnston's avatar
      Fix debian package builds. (#10931) · a8bbf085
      Erik Johnston authored
      This was due to dh-virtualenv builds being broken due to Shpinx removing
      deprecated APIs.
      a8bbf085
    • Erik Johnston's avatar
      Encode JSON responses on a thread in C, mk2 (#10905) · 707d5e4e
      Erik Johnston authored
      Currently we use `JsonEncoder.iterencode` to write JSON responses, which ensures that we don't block the main reactor thread when encoding huge objects. The downside to this is that `iterencode` falls back to using a pure Python encoder that is *much* less efficient and can easily burn a lot of CPU for huge responses. To fix this, while still ensuring we don't block the reactor loop, we encode the JSON on a threadpool using the standard `JsonEncoder.encode` functions, which is backed by a C library.
      
      Doing so, however, requires `respond_with_json` to have access to the reactor, which it previously didn't. There are two ways of doing this:
      
      1. threading through the reactor object, which is a bit fiddly as e.g. `DirectServeJsonResource` doesn't currently take a reactor, but is exposed to modules and so is a PITA to change; or
      2. expose the reactor in `SynapseRequest`, which requires updating a bunch of servlet types.
      
      I went with the latter as that is just a mechanical change, and I think makes sense as a request already has a reactor associated with it (via its http channel). 
      707d5e4e
  3. Sep 27, 2021
  4. Sep 24, 2021
  5. Sep 23, 2021
  6. Sep 22, 2021
Loading