From cdbd249e88bffcea53678456e056163be1650ae4 Mon Sep 17 00:00:00 2001 From: prajjawal05 Date: Tue, 22 Aug 2023 01:57:31 -0400 Subject: [PATCH] Added logs in MultiWriterIdGenerator.__init__() and get_cache_dict. --- synapse/storage/database.py | 1 + synapse/storage/util/id_generators.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/synapse/storage/database.py b/synapse/storage/database.py index a1c8fb0f46..89ec32f12a 100644 --- a/synapse/storage/database.py +++ b/synapse/storage/database.py @@ -2395,6 +2395,7 @@ class DatabasePool: min_val = min(cache.values()) + 1 else: min_val = max_value + logger.debug("Calling get_cache_dict %s: %s", table, sql) return cache, min_val diff --git a/synapse/storage/util/id_generators.py b/synapse/storage/util/id_generators.py index d2c874b9a8..f0d4ff2f05 100644 --- a/synapse/storage/util/id_generators.py +++ b/synapse/storage/util/id_generators.py @@ -432,7 +432,10 @@ class MultiWriterIdGenerator(AbstractStreamIdGenerator): # write to the stream. In which case, let's pre-seed our own # position with the current minimum. self._current_positions[self._instance_name] = self._persisted_upto_position - + + table_string = "\n".join(", ".join(row) for row in tables) + logger.debug(f"{table_string}") + def _load_current_ids( self, db_conn: LoggingDatabaseConnection,