summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--changelog.d/11865.removal1
-rwxr-xr-xsynctl8
2 files changed, 9 insertions, 0 deletions
diff --git a/changelog.d/11865.removal b/changelog.d/11865.removal
new file mode 100644
index 0000000000..9fcabfc720
--- /dev/null
+++ b/changelog.d/11865.removal
@@ -0,0 +1 @@
+Deprecate using `synctl` with the config option `synctl_cache_factor` and print a warning if a user still uses this option.
diff --git a/synctl b/synctl
index 0e54f4847b..1ab36949c7 100755
--- a/synctl
+++ b/synctl
@@ -37,6 +37,13 @@ YELLOW = "\x1b[1;33m"
 RED = "\x1b[1;31m"
 NORMAL = "\x1b[m"
 
+SYNCTL_CACHE_FACTOR_WARNING = """\
+Setting 'synctl_cache_factor' in the config is deprecated. Instead, please do
+one of the following:
+ - Either set the environment variable 'SYNAPSE_CACHE_FACTOR'
+ - or set 'caches.global_factor' in the homeserver config.
+--------------------------------------------------------------------------------"""
+
 
 def pid_running(pid):
     try:
@@ -228,6 +235,7 @@ def main():
     start_stop_synapse = True
 
     if cache_factor:
+        write(SYNCTL_CACHE_FACTOR_WARNING)
         os.environ["SYNAPSE_CACHE_FACTOR"] = str(cache_factor)
 
     cache_factors = config.get("synctl_cache_factors", {})