summary refs log tree commit diff
path: root/synapse/storage/databases
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-12-08 14:15:14 +0000
committerGitHub <noreply@github.com>2021-12-08 14:15:14 +0000
commitff7cc17b5706ff3f386b15fda668511c0502ab9c (patch)
treefb0d97f34f96e406cc7fa8eddfeddf0641d78e5a /synapse/storage/databases
parentSend and handle cross-signing messages using the stable prefix. (#10520) (diff)
downloadsynapse-ff7cc17b5706ff3f386b15fda668511c0502ab9c.tar.xz
Improve log messages for stream ids (#11536)
Somehow I'd managed to get my database in a pickle with stream ids. These
changes were useful to debug.
Diffstat (limited to 'synapse/storage/databases')
-rw-r--r--synapse/storage/databases/main/state_deltas.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/databases/main/state_deltas.py b/synapse/storage/databases/main/state_deltas.py
index 7f3624b128..188afec332 100644
--- a/synapse/storage/databases/main/state_deltas.py
+++ b/synapse/storage/databases/main/state_deltas.py
@@ -56,7 +56,9 @@ class StateDeltasStore(SQLBaseStore):
         prev_stream_id = int(prev_stream_id)
 
         # check we're not going backwards
-        assert prev_stream_id <= max_stream_id
+        assert (
+            prev_stream_id <= max_stream_id
+        ), f"New stream id {max_stream_id} is smaller than prev stream id {prev_stream_id}"
 
         if not self._curr_state_delta_stream_cache.has_any_entity_changed(
             prev_stream_id