Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Commit 708a6ff

Browse files
committed
Add warning log check for missing event replication batches
1 parent a7624d5 commit 708a6ff

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

synapse/storage/databases/main/cache.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ def process_replication_rows(
151151
if stream_name == EventsStream.NAME:
152152
for row in rows:
153153
self._process_event_stream_row(token, row)
154+
# Check for baches that only contain state rows, this should *not* happen as the event
155+
# and state rows (for the same event) should always be in a batch.
156+
row_types = {row.type for row in rows}
157+
if row_types == {EventsStreamCurrentStateRow.TypeId}:
158+
logger.warning("Saw state-only event replication row batch:\n%r", rows)
154159
elif stream_name == BackfillStream.NAME:
155160
for row in rows:
156161
self._invalidate_caches_for_event(

0 commit comments

Comments
 (0)