Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Move getEvent cache to externalCache #9379

Closed
wants to merge 47 commits into from

Commits on Feb 12, 2021

  1. Configuration menu
    Copy the full SHA
    264e9a6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0b11773 View commit details
    Browse the repository at this point in the history
  3. changelog+linting

    Half-Shot committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    963e1c6 View commit details
    Browse the repository at this point in the history
  4. await

    Half-Shot committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    fc38c18 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5358283 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c673e3e View commit details
    Browse the repository at this point in the history
  7. linting

    Half-Shot committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    9ac17af View commit details
    Browse the repository at this point in the history
  8. fix port db

    Half-Shot committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    e9fbbf1 View commit details
    Browse the repository at this point in the history
  9. Update synapse/storage/databases/main/events_worker.py

    Co-authored-by: Christian Paul <christianp@matrix.org>
    Half-Shot and Christian Paul committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    873da38 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2021

  1. Do not auto expire events

    Half-Shot committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    2de6060 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2021

  1. Configuration menu
    Copy the full SHA
    c2f5415 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8b36dee View commit details
    Browse the repository at this point in the history
  3. Squash changes to events_worker to fix commit issues

    This change:
    - Adds dedicated functions to dehydrate and hydrate frozen events in the cache
    - Resets the expiry time on events
    Half-Shot committed Feb 22, 2021
    Configuration menu
    Copy the full SHA
    f55d926 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2be3a02 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    48b35d9 View commit details
    Browse the repository at this point in the history
  6. linting

    Half-Shot committed Feb 22, 2021
    Configuration menu
    Copy the full SHA
    1e11898 View commit details
    Browse the repository at this point in the history
  7. fix config getter

    Half-Shot committed Feb 22, 2021
    Configuration menu
    Copy the full SHA
    2585f57 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    52d3e5c View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2021

  1. this is a property

    Half-Shot committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    0831f16 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2021

  1. Configuration menu
    Copy the full SHA
    4a32600 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2021

  1. Configuration menu
    Copy the full SHA
    316db51 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2021

  1. Merge tag 'v1.30.0rc1' into hs/hacked-together-event-cache

    Synapse 1.30.0rc1 (2021-03-16)
    ==============================
    
    Note that this release deprecates the ability for appservices to
    call `POST /_matrix/client/r0/register`  without the body parameter `type`. Appservice
    developers should use a `type` value of `m.login.application_service` as
    per [the spec](https://matrix.org/docs/spec/application_service/r0.1.2#server-admin-style-permissions).
    In future releases, calling this endpoint with an access token - but without a `m.login.application_service`
    type - will fail.
    
    Features
    --------
    
    - Add prometheus metrics for number of users successfully registering and logging in. ([\#9510](#9510), [\#9511](#9511), [\#9573](#9573))
    - Add `synapse_federation_last_sent_pdu_time` and `synapse_federation_last_received_pdu_time` prometheus metrics, which monitor federation delays by reporting the timestamps of messages sent and received to a set of remote servers. ([\#9540](#9540))
    - Add support for generating JSON Web Tokens dynamically for use as OIDC client secrets. ([\#9549](#9549))
    - Optimise handling of incomplete room history for incoming federation. ([\#9601](#9601))
    - Finalise support for allowing clients to pick an SSO Identity Provider ([MSC2858](matrix-org/matrix-spec-proposals#2858)). ([\#9617](#9617))
    - Tell spam checker modules about the SSO IdP a user registered through if one was used. ([\#9626](#9626))
    
    Bugfixes
    --------
    
    - Fix long-standing bug when generating thumbnails for some images with transparency: `TypeError: cannot unpack non-iterable int object`. ([\#9473](#9473))
    - Purge chain cover indexes for events that were purged prior to Synapse v1.29.0. ([\#9542](#9542), [\#9583](#9583))
    - Fix bug where federation requests were not correctly retried on 5xx responses. ([\#9567](#9567))
    - Fix re-activating an account via the admin API when local passwords are disabled. ([\#9587](#9587))
    - Fix a bug introduced in Synapse 1.20 which caused incoming federation transactions to stack up, causing slow recovery from outages. ([\#9597](#9597))
    - Fix a bug introduced in v1.28.0 where the OpenID Connect callback endpoint could error with a `MacaroonInitException`. ([\#9620](#9620))
    - Fix Internal Server Error on `GET /_synapse/client/saml2/authn_response` request. ([\#9623](#9623))
    
    Updates to the Docker image
    ---------------------------
    
    - Use jemalloc if available in docker. ([\#8553](#8553))
    
    Improved Documentation
    ----------------------
    
    - Add relayd entry to reverse proxy example configurations. ([\#9508](#9508))
    - Improve the SAML2 upgrade notes for 1.27.0. ([\#9550](#9550))
    - Link to the "List user's media" admin API from the media admin API docs. ([\#9571](#9571))
    - Clarify the spam checker modules documentation example to mention that `parse_config` is a required method. ([\#9580](#9580))
    - Clarify the sample configuration for `stats` settings. ([\#9604](#9604))
    
    Deprecations and Removals
    -------------------------
    
    - The `synapse_federation_last_sent_pdu_age` and `synapse_federation_last_received_pdu_age` prometheus metrics have been removed. They are replaced by `synapse_federation_last_sent_pdu_time` and `synapse_federation_last_received_pdu_time`. ([\#9540](#9540))
    - Registering an Application Service user without using the `m.login.application_service` login type will be unsupported in an upcoming Synapse release. ([\#9559](#9559))
    
    Internal Changes
    ----------------
    
    - Add tests to ResponseCache. ([\#9458](#9458))
    - Add type hints to purge room and server notice admin API. ([\#9520](#9520))
    - Add extra logging to ObservableDeferred when callbacks throw exceptions. ([\#9523](#9523))
    - Fix incorrect type hints. ([\#9528](#9528), [\#9543](#9543), [\#9591](#9591), [\#9608](#9608), [\#9618](#9618))
    - Add an additional test for purging a room. ([\#9541](#9541))
    - Add a `.git-blame-ignore-revs` file with the hashes of auto-formatting. ([\#9560](#9560))
    - Increase the threshold before which outbound federation to a server goes into "catch up" mode, which is expensive for the remote server to handle. ([\#9561](#9561))
    - Fix spurious errors reported by the `config-lint.sh` script. ([\#9562](#9562))
    - Fix type hints and tests for BlacklistingAgentWrapper and BlacklistingReactorWrapper. ([\#9563](#9563))
    - Do not have mypy ignore type hints from unpaddedbase64. ([\#9568](#9568))
    - Improve efficiency of calculating the auth chain in large rooms. ([\#9576](#9576))
    - Convert `synapse.types.Requester` to an `attrs` class. ([\#9586](#9586))
    - Add logging for redis connection setup. ([\#9590](#9590))
    - Improve logging when processing incoming transactions. ([\#9596](#9596))
    - Remove unused `stats.retention` setting, and emit a warning if stats are disabled. ([\#9604](#9604))
    - Prevent attempting to bundle aggregations for state events in /context APIs. ([\#9619](#9619))
    Half-Shot committed Mar 16, 2021
    Configuration menu
    Copy the full SHA
    45b1c58 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2021

  1. Merge tag 'v1.30.0' into hs/hacked-together-event-cache

    Synapse 1.30.0 (2021-03-22)
    ===========================
    
    Note that this release deprecates the ability for appservices to
    call `POST /_matrix/client/r0/register`  without the body parameter `type`. Appservice
    developers should use a `type` value of `m.login.application_service` as
    per [the spec](https://matrix.org/docs/spec/application_service/r0.1.2#server-admin-style-permissions).
    In future releases, calling this endpoint with an access token - but without a `m.login.application_service`
    type - will fail.
    
    No significant changes.
    
    Synapse 1.30.0rc1 (2021-03-16)
    ==============================
    
    Features
    --------
    
    - Add prometheus metrics for number of users successfully registering and logging in. ([\#9510](#9510), [\#9511](#9511), [\#9573](#9573))
    - Add `synapse_federation_last_sent_pdu_time` and `synapse_federation_last_received_pdu_time` prometheus metrics, which monitor federation delays by reporting the timestamps of messages sent and received to a set of remote servers. ([\#9540](#9540))
    - Add support for generating JSON Web Tokens dynamically for use as OIDC client secrets. ([\#9549](#9549))
    - Optimise handling of incomplete room history for incoming federation. ([\#9601](#9601))
    - Finalise support for allowing clients to pick an SSO Identity Provider ([MSC2858](matrix-org/matrix-spec-proposals#2858)). ([\#9617](#9617))
    - Tell spam checker modules about the SSO IdP a user registered through if one was used. ([\#9626](#9626))
    
    Bugfixes
    --------
    
    - Fix long-standing bug when generating thumbnails for some images with transparency: `TypeError: cannot unpack non-iterable int object`. ([\#9473](#9473))
    - Purge chain cover indexes for events that were purged prior to Synapse v1.29.0. ([\#9542](#9542), [\#9583](#9583))
    - Fix bug where federation requests were not correctly retried on 5xx responses. ([\#9567](#9567))
    - Fix re-activating an account via the admin API when local passwords are disabled. ([\#9587](#9587))
    - Fix a bug introduced in Synapse 1.20 which caused incoming federation transactions to stack up, causing slow recovery from outages. ([\#9597](#9597))
    - Fix a bug introduced in v1.28.0 where the OpenID Connect callback endpoint could error with a `MacaroonInitException`. ([\#9620](#9620))
    - Fix Internal Server Error on `GET /_synapse/client/saml2/authn_response` request. ([\#9623](#9623))
    
    Updates to the Docker image
    ---------------------------
    
    - Make use of an improved malloc implementation (`jemalloc`) in the docker image. ([\#8553](#8553))
    
    Improved Documentation
    ----------------------
    
    - Add relayd entry to reverse proxy example configurations. ([\#9508](#9508))
    - Improve the SAML2 upgrade notes for 1.27.0. ([\#9550](#9550))
    - Link to the "List user's media" admin API from the media admin API docs. ([\#9571](#9571))
    - Clarify the spam checker modules documentation example to mention that `parse_config` is a required method. ([\#9580](#9580))
    - Clarify the sample configuration for `stats` settings. ([\#9604](#9604))
    
    Deprecations and Removals
    -------------------------
    
    - The `synapse_federation_last_sent_pdu_age` and `synapse_federation_last_received_pdu_age` prometheus metrics have been removed. They are replaced by `synapse_federation_last_sent_pdu_time` and `synapse_federation_last_received_pdu_time`. ([\#9540](#9540))
    - Registering an Application Service user without using the `m.login.application_service` login type will be unsupported in an upcoming Synapse release. ([\#9559](#9559))
    
    Internal Changes
    ----------------
    
    - Add tests to ResponseCache. ([\#9458](#9458))
    - Add type hints to purge room and server notice admin API. ([\#9520](#9520))
    - Add extra logging to ObservableDeferred when callbacks throw exceptions. ([\#9523](#9523))
    - Fix incorrect type hints. ([\#9528](#9528), [\#9543](#9543), [\#9591](#9591), [\#9608](#9608), [\#9618](#9618))
    - Add an additional test for purging a room. ([\#9541](#9541))
    - Add a `.git-blame-ignore-revs` file with the hashes of auto-formatting. ([\#9560](#9560))
    - Increase the threshold before which outbound federation to a server goes into "catch up" mode, which is expensive for the remote server to handle. ([\#9561](#9561))
    - Fix spurious errors reported by the `config-lint.sh` script. ([\#9562](#9562))
    - Fix type hints and tests for BlacklistingAgentWrapper and BlacklistingReactorWrapper. ([\#9563](#9563))
    - Do not have mypy ignore type hints from unpaddedbase64. ([\#9568](#9568))
    - Improve efficiency of calculating the auth chain in large rooms. ([\#9576](#9576))
    - Convert `synapse.types.Requester` to an `attrs` class. ([\#9586](#9586))
    - Add logging for redis connection setup. ([\#9590](#9590))
    - Improve logging when processing incoming transactions. ([\#9596](#9596))
    - Remove unused `stats.retention` setting, and emit a warning if stats are disabled. ([\#9604](#9604))
    - Prevent attempting to bundle aggregations for state events in /context APIs. ([\#9619](#9619))
    Half-Shot committed Mar 22, 2021
    Configuration menu
    Copy the full SHA
    16f2376 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9009d29 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2021

  1. Configuration menu
    Copy the full SHA
    5f63151 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2021

  1. Configuration menu
    Copy the full SHA
    4be9d09 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2021

  1. Configuration menu
    Copy the full SHA
    82fcd3c View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2021

  1. Configuration menu
    Copy the full SHA
    f98d098 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2021

  1. Configuration menu
    Copy the full SHA
    d77072f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5e8c7b4 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2021

  1. Configuration menu
    Copy the full SHA
    1315b6a View commit details
    Browse the repository at this point in the history

Commits on May 5, 2021

  1. Configuration menu
    Copy the full SHA
    89ad2f6 View commit details
    Browse the repository at this point in the history
  2. Fix merge header

    Half-Shot committed May 5, 2021
    Configuration menu
    Copy the full SHA
    76288b9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1f3e399 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2021

  1. Attempt to pin to fix

    Half-Shot committed May 6, 2021
    Configuration menu
    Copy the full SHA
    a5e4002 View commit details
    Browse the repository at this point in the history
  2. fix version

    Half-Shot committed May 6, 2021
    Configuration menu
    Copy the full SHA
    6a20b4f View commit details
    Browse the repository at this point in the history

Commits on May 11, 2021

  1. Configuration menu
    Copy the full SHA
    dacc395 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2021

  1. Configuration menu
    Copy the full SHA
    7d33ba7 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2021

  1. Merge tag 'v1.37.0rc1' into hs/hacked-together-event-cache

    Synapse 1.37.0rc1 (2021-06-24)
    ==============================
    
    This release deprecates the current spam checker interface. See the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#deprecation-of-the-current-spam-checker-interface) for more information on how to update to the new generic module interface.
    
    This release also removes support for fetching and renewing TLS certificates using the ACME v1 protocol, which has been fully decommissioned by Let's Encrypt on June 1st 2021. Admins previously using this feature should use a [reverse proxy](https://matrix-org.github.io/synapse/develop/reverse_proxy.html) to handle TLS termination, or use an external ACME client (such as [certbot](https://certbot.eff.org/)) to retrieve a certificate and key and provide them to Synapse using the `tls_certificate_path` and `tls_private_key_path` configuration settings.
    
    Features
    --------
    
    - Implement "room knocking" as per [MSC2403](matrix-org/matrix-spec-proposals#2403). Contributed by @Sorunome and anoa. ([\#6739](#6739), [\#9359](#9359), [\#10167](#10167), [\#10212](#10212), [\#10227](#10227))
    - Add experimental support for backfilling history into rooms ([MSC2716](matrix-org/matrix-spec-proposals#2716)). ([\#9247](#9247))
    - Implement a generic interface for third-party plugin modules. ([\#10062](#10062), [\#10206](#10206))
    - Implement config option `sso.update_profile_information` to sync SSO users' profile information with the identity provider each time they login. Currently only displayname is supported. ([\#10108](#10108))
    - Ensure that errors during startup are written to the logs and the console. ([\#10191](#10191))
    
    Bugfixes
    --------
    
    - Fix a bug introduced in Synapse v1.25.0 that prevented the `ip_range_whitelist` configuration option from working for federation and identity servers. Contributed by @mikure. ([\#10115](#10115))
    - Remove a broken import line in Synapse's `admin_cmd` worker. Broke in Synapse v1.33.0. ([\#10154](#10154))
    - Fix a bug introduced in Synapse v1.21.0 which could cause `/sync` to return immediately with an empty response. ([\#10157](#10157), [\#10158](#10158))
    - Fix a minor bug in the response to `/_matrix/client/r0/user/{user}/openid/request_token` causing `expires_in` to be a float instead of an integer. Contributed by @lukaslihotzki. ([\#10175](#10175))
    - Always require users to re-authenticate for dangerous operations: deactivating an account, modifying an account password, and adding 3PIDs. ([\#10184](#10184))
    - Fix a bug introduced in Synpase v1.7.2 where remote server count metrics collection would be incorrectly delayed on startup. Found by @heftig. ([\#10195](#10195))
    - Fix a bug introduced in Synapse v1.35.1 where an `allow` key of a `m.room.join_rules` event could be applied for incorrect room versions and configurations. ([\#10208](#10208))
    - Fix performance regression in responding to user key requests over federation. Introduced in Synapse v1.34.0rc1. ([\#10221](#10221))
    
    Improved Documentation
    ----------------------
    
    - Add a new guide to decoding request logs. ([\#8436](#8436))
    - Mention in the sample homeserver config that you may need to configure max upload size in your reverse proxy. Contributed by @aaronraimist. ([\#10122](#10122))
    - Fix broken links in documentation. ([\#10180](#10180))
    - Deploy a snapshot of the documentation website upon each new Synapse release. ([\#10198](#10198))
    
    Deprecations and Removals
    -------------------------
    
    - The current spam checker interface is deprecated in favour of a new generic modules system. See the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#deprecation-of-the-current-spam-checker-interface) for more information on how to update to the new system. ([\#10062](#10062), [\#10210](#10210), [\#10238](#10238))
    - Stop supporting the unstable spaces prefixes from MSC1772. ([\#10161](#10161))
    - Remove Synapse's support for automatically fetching and renewing certificates using the ACME v1 protocol. This protocol has been fully turned off by Let's Encrypt for existing installations on June 1st 2021. Admins previously using this feature should use a [reverse proxy](https://matrix-org.github.io/synapse/develop/reverse_proxy.html) to handle TLS termination, or use an external ACME client (such as [certbot](https://certbot.eff.org/)) to retrieve a certificate and key and provide them to Synapse using the `tls_certificate_path` and `tls_private_key_path` configuration settings. ([\#10194](#10194))
    
    Internal Changes
    ----------------
    
    - Update the database schema versioning to support gradual migration away from legacy tables. ([\#9933](#9933))
    - Add type hints to the federation servlets. ([\#10080](#10080))
    - Improve OpenTracing for event persistence. ([\#10134](#10134), [\#10193](#10193))
    - Clean up the interface for injecting OpenTracing over HTTP. ([\#10143](#10143))
    - Limit the number of in-flight `/keys/query` requests from a single device. ([\#10144](#10144))
    - Refactor EventPersistenceQueue. ([\#10145](#10145))
    - Document `SYNAPSE_TEST_LOG_LEVEL` to see the logger output when running tests. ([\#10148](#10148))
    - Update the Complement build tags in GitHub Actions to test currently experimental features. ([\#10155](#10155))
    - Add a `synapse_federation_soft_failed_events_total` metric to track how often events are soft failed. ([\#10156](#10156))
    - Fetch the corresponding complement branch when performing CI. ([\#10160](#10160))
    - Add some developer documentation about boolean columns in database schemas. ([\#10164](#10164))
    - Add extra logging fields to better debug where events are being soft failed. ([\#10168](#10168))
    - Add debug logging for when we enter and exit `Measure` blocks. ([\#10183](#10183))
    - Improve comments in structured logging code. ([\#10188](#10188))
    - Update [MSC3083](matrix-org/matrix-spec-proposals#3083) support with modifications from the MSC. ([\#10189](#10189))
    - Remove redundant DNS lookup limiter. ([\#10190](#10190))
    - Upgrade `black` linting tool to 21.6b0. ([\#10197](#10197))
    - Expose OpenTracing trace id in response headers. ([\#10199](#10199))
    Half-Shot committed Jun 28, 2021
    Configuration menu
    Copy the full SHA
    8bfb649 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2021

  1. Configuration menu
    Copy the full SHA
    81dd28c View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2021

  1. Configuration menu
    Copy the full SHA
    f197953 View commit details
    Browse the repository at this point in the history
  2. Fix merge fail

    Half-Shot committed Jul 20, 2021
    Configuration menu
    Copy the full SHA
    f6be804 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2021

  1. Configuration menu
    Copy the full SHA
    6497040 View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2021

  1. Configuration menu
    Copy the full SHA
    fad9189 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2021

  1. Configuration menu
    Copy the full SHA
    61293c8 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2021

  1. Configuration menu
    Copy the full SHA
    fb71966 View commit details
    Browse the repository at this point in the history
  2. await

    Half-Shot committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    1eb989f View commit details
    Browse the repository at this point in the history