summary refs log tree commit diff
path: root/synapse/handlers/pagination.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2020-01-17 20:51:44 +0000
committerGitHub <noreply@github.com>2020-01-17 20:51:44 +0000
commita17f64361c87f06c67fd7bb5a98b54dc5a2bb4fb (patch)
tree64f87e61c6a8a4da74c1b45f84f4acdab14c2eb7 /synapse/handlers/pagination.py
parentFix up changelog (diff)
downloadsynapse-a17f64361c87f06c67fd7bb5a98b54dc5a2bb4fb.tar.xz
Add more logging around message retention policies support (#6717)
So we can debug issues like #6683 more easily
Diffstat (limited to 'synapse/handlers/pagination.py')
-rw-r--r--synapse/handlers/pagination.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/synapse/handlers/pagination.py b/synapse/handlers/pagination.py
index 3ee6a091c5..71d76202c9 100644
--- a/synapse/handlers/pagination.py
+++ b/synapse/handlers/pagination.py
@@ -88,6 +88,8 @@ class PaginationHandler(object):
         if hs.config.retention_enabled:
             # Run the purge jobs described in the configuration file.
             for job in hs.config.retention_purge_jobs:
+                logger.info("Setting up purge job with config: %s", job)
+
                 self.clock.looping_call(
                     run_as_background_process,
                     job["interval"],
@@ -130,11 +132,22 @@ class PaginationHandler(object):
         else:
             include_null = False
 
+        logger.info(
+            "[purge] Running purge job for %d < max_lifetime <= %d (include NULLs = %s)",
+            min_ms,
+            max_ms,
+            include_null,
+        )
+
         rooms = yield self.store.get_rooms_for_retention_period_in_range(
             min_ms, max_ms, include_null
         )
 
+        logger.debug("[purge] Rooms to purge: %s", rooms)
+
         for room_id, retention_policy in iteritems(rooms):
+            logger.info("[purge] Attempting to purge messages in room %s", room_id)
+
             if room_id in self._purges_in_progress_by_room:
                 logger.warning(
                     "[purge] not purging room %s as there's an ongoing purge running"