summary refs log tree commit diff
path: root/synapse/metrics
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2018-10-04 17:26:59 +0100
committerGitHub <noreply@github.com>2018-10-04 17:26:59 +0100
commited82043efb5456dc03a6a9969b7e4f3f941a6c67 (patch)
tree5c2b73172bc4deefb9efb6de8c8e59cc184d1263 /synapse/metrics
parentmove logic into register, fix room alias localpart bug, tests (diff)
parentMerge pull request #3995 from matrix-org/rav/no_deextrem_outliers (diff)
downloadsynapse-ed82043efb5456dc03a6a9969b7e4f3f941a6c67.tar.xz
Merge branch 'develop' into matthew/autocreate_autojoin
Diffstat (limited to 'synapse/metrics')
-rw-r--r--synapse/metrics/background_process_metrics.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/metrics/background_process_metrics.py b/synapse/metrics/background_process_metrics.py
index 173908299c..037f1c490e 100644
--- a/synapse/metrics/background_process_metrics.py
+++ b/synapse/metrics/background_process_metrics.py
@@ -101,9 +101,13 @@ class _Collector(object):
             labels=["name"],
         )
 
-        # We copy the dict so that it doesn't change from underneath us
+        # We copy the dict so that it doesn't change from underneath us.
+        # We also copy the process lists as that can also change
         with _bg_metrics_lock:
-            _background_processes_copy = dict(_background_processes)
+            _background_processes_copy = {
+                k: list(v)
+                for k, v in six.iteritems(_background_processes)
+            }
 
         for desc, processes in six.iteritems(_background_processes_copy):
             background_process_in_flight_count.add_metric(