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

Reload cache factors from disk on SIGHUP #12673

Merged
merged 17 commits into from
May 11, 2022
Merged

Commits on May 9, 2022

  1. Fix minor typos in cache config docstring

    David Robertson committed May 9, 2022
    Configuration menu
    Copy the full SHA
    d942823 View commit details
    Browse the repository at this point in the history
  2. Add drive-by annotations in s.config._base

    David Robertson committed May 9, 2022
    Configuration menu
    Copy the full SHA
    077ce90 View commit details
    Browse the repository at this point in the history
  3. Define RootConfig.reload_config_section

    David Robertson committed May 9, 2022
    Configuration menu
    Copy the full SHA
    1f668be View commit details
    Browse the repository at this point in the history
  4. Move format_config_error to s.config._base

    right below the definition of ConfigError.
    David Robertson committed May 9, 2022
    Configuration menu
    Copy the full SHA
    2a5ce2f View commit details
    Browse the repository at this point in the history
  5. Reload cache config on sighup

    David Robertson committed May 9, 2022
    Configuration menu
    Copy the full SHA
    69da4ca View commit details
    Browse the repository at this point in the history
  6. Changelog

    David Robertson committed May 9, 2022
    Configuration menu
    Copy the full SHA
    85f4385 View commit details
    Browse the repository at this point in the history
  7. If global_factor is omitted, use 0.5 on reload

    Consider the following scenario:
    
    1. Start synapse with config that omits a `caches.global_factor`.
    2. `CacheProperties.default_factor_size` is now 0.5.
    3. Edit config to set `caches.global_factor = 2`.
    4. Reload config.
    5. Read `CacheProperties.default_factor_size`.
       - Without patch: still 2
       - With patch: backt to 0.5
    
    Without this commit, when we reload config we will compute
    `self.global_factor` to be the _previous_ global cache factor. I think
    this is surprising: I would that factor to reflect what the config file
    says.
    David Robertson committed May 9, 2022
    Configuration menu
    Copy the full SHA
    1febfd6 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2022

  1. Annotate CacheConfig's instance vars at the top

    so I can see what it actually contains
    David Robertson committed May 10, 2022
    Configuration menu
    Copy the full SHA
    4039b2d View commit details
    Browse the repository at this point in the history
  2. Separate reading and applying cache config

    David Robertson committed May 10, 2022
    Configuration menu
    Copy the full SHA
    b7a6ec5 View commit details
    Browse the repository at this point in the history
  3. Remove redundant assert

    David Robertson committed May 10, 2022
    Configuration menu
    Copy the full SHA
    519f98b View commit details
    Browse the repository at this point in the history
  4. Create a new config object when reloading

    This ensures we don't partially overwrite the existing object if we
    encounter an exception during `read_config()`.
    David Robertson committed May 10, 2022
    Configuration menu
    Copy the full SHA
    b9595ad View commit details
    Browse the repository at this point in the history
  5. Fix tests oops

    David Robertson committed May 10, 2022
    Configuration menu
    Copy the full SHA
    1118b9f View commit details
    Browse the repository at this point in the history
  6. Document the ability to reload cache config

    David Robertson committed May 10, 2022
    Configuration menu
    Copy the full SHA
    f6e1394 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2022

  1. Master process needs to apply cache config too.

    David Robertson committed May 11, 2022
    Configuration menu
    Copy the full SHA
    55963ac View commit details
    Browse the repository at this point in the history
  2. Update TRACK_MEMORY_USAGE on cache config reload

    David Robertson committed May 11, 2022
    Configuration menu
    Copy the full SHA
    f199d82 View commit details
    Browse the repository at this point in the history
  3. Overly comprehensive docstring

    David Robertson committed May 11, 2022
    Configuration menu
    Copy the full SHA
    412414d View commit details
    Browse the repository at this point in the history
  4. Don't update TRACK_MEMORY_USAGE; update docs

    David Robertson committed May 11, 2022
    Configuration menu
    Copy the full SHA
    a7418c0 View commit details
    Browse the repository at this point in the history