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

Add logging to /sync for debugging #11916 #12068

Merged
merged 2 commits into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/12068.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add some logging to `/sync` to try and track down #11916.
9 changes: 9 additions & 0 deletions synapse/handlers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,15 @@ async def get_state_at(
else:
# no events in this room - so presumably no state
state = {}

# (erikj) This should be rarely hit, but we've had some reports that
# we get more state down gappy syncs than we should, so let's add
# some logging.
logger.info(
"Failed to find any events in room %s at %s",
room_id,
stream_position.room_key,
)
return state

async def compute_summary(
Expand Down