Просмотр исходного кода

Merge pull request #3561 from matrix-org/rav/disable_logcontext_warning

Disable logcontext warning
Richard van der Hoff 5 лет назад
Родитель
Сommit
2de3d994f3
2 измененных файлов с 5 добавлено и 3 удалено
  1. 1 0
      changelog.d/3561.bugfix
  2. 4 3
      synapse/storage/_base.py

+ 1 - 0
changelog.d/3561.bugfix

@@ -0,0 +1 @@
+Disable a noisy warning about logcontexts

+ 4 - 3
synapse/storage/_base.py

@@ -343,9 +343,10 @@ class SQLBaseStore(object):
         """
         parent_context = LoggingContext.current_context()
         if parent_context == LoggingContext.sentinel:
-            logger.warn(
-                "Running db txn from sentinel context: metrics will be lost",
-            )
+            # warning disabled for 0.33.0 release; proper fixes will land imminently.
+            # logger.warn(
+            #    "Running db txn from sentinel context: metrics will be lost",
+            # )
             parent_context = None
 
         start_time = time.time()