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

Fix specifying cache factors via env vars with * in name. #7580

Merged
merged 4 commits into from
May 27, 2020

Conversation

erikjohnston
Copy link
Member

This mostly applise to *stateGroupCache* and co.

Broke in #6391.

This mostly applise to `*stateGroupCache*` and co.

Broke in #6391.
@erikjohnston erikjohnston requested a review from a team May 27, 2020 10:35
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks. I think we may want to update the config comment to explain how cache names are normalised.

# Ex. SYNAPSE_CACHE_FACTOR_GET_USERS_WHO_SHARE_ROOM_WITH_USER=2.0

# alphanumeric or underscores. These caches can be named with or
# without the special characters stripped. For example, to specify
# the cache factor for `*stateGroupCache*` via an environment
# variable would be `SYNAPSE_CACHE_FACTOR_STATEGROUPCACHE=2`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may put a 2.0 here instead to keep it in line with the other example, but up to you.


Since we specify cache names in config and environment variables we need to
ignore case and special characters. For example, some caches have asterisks
in their name to donate that they're not attached to a particular database
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
in their name to donate that they're not attached to a particular database
in their name to denote that they're not attached to a particular database

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, didn't see this before merge. I fixed it directly.

@erikjohnston erikjohnston merged commit 4ba5555 into release-v1.14.0 May 27, 2020
@erikjohnston erikjohnston deleted the erikj/canonical_cache_name branch May 27, 2020 12:17
babolivier added a commit that referenced this pull request May 27, 2020
Synapse 1.14.0rc2 (2020-05-27)
==============================

Bugfixes
--------

- Fix cache config to not apply cache factor to event cache. Regression in v1.14.0rc1. ([\#7578](#7578))
- Fix bug where `ReplicationStreamer` was not always started when replication was enabled. Bug introduced in v1.14.0rc1. ([\#7579](#7579))
- Fix specifying individual cache factors for caches with special characters in their name. Regression in v1.14.0rc1. ([\#7580](#7580))

Improved Documentation
----------------------

- Fix the OIDC `client_auth_method` value in the sample config. ([\#7581](#7581))
phil-flex pushed a commit to phil-flex/synapse that referenced this pull request Jun 16, 2020
babolivier pushed a commit that referenced this pull request Sep 1, 2021
…dinsic-release-v1.14.x

* 'release-v1.14.0' of github.com:matrix-org/synapse: (108 commits)
  Fix typo in PR link
  Update debian changelog
  1.14.0
  Improve changelog wording
  1.14.0rc2
  Fix sample config docs error (#7581)
  Fix up comments
  Fix specifying cache factors via env vars with * in name. (#7580)
  Don't apply cache factor to event cache. (#7578)
  Ensure ReplicationStreamer is always started when replication enabled. (#7579)
  Remove the changes to the debian changelog
  Not full release yet, this is rc1
  Merge event persistence move changelog entries
  More changelog fix
  Changelog fixes
  1.14.0
  Replace device_27_unique_idx bg update with a fg one (#7562)
  Fix incorrect exception handling in KeyUploadServlet.on_POST (#7563)
  Fix recording of federation stream token (#7564)
  Simplify reap_monthly_active_users (#7558)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants