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

Commit

Permalink
Merge pull request #5860 from matrix-org/erikj/update_5704_comments
Browse files Browse the repository at this point in the history
Remove logging for #5407 and update comments
erikjohnston authored Aug 19, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents bdd201e + ebba15e commit d514dac
Showing 2 changed files with 6 additions and 17 deletions.
1 change: 1 addition & 0 deletions changelog.d/5860.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove log line for debugging issue #5407.
22 changes: 5 additions & 17 deletions synapse/handlers/sync.py
Original file line number Diff line number Diff line change
@@ -786,9 +786,8 @@ def compute_state_delta(
batch.events[0].event_id, state_filter=state_filter
)
else:
# Its not clear how we get here, but empirically we do
# (#5407). Logging has been added elsewhere to try and
# figure out where this state comes from.
# We can get here if the user has ignored the senders of all
# the recent events.
state_at_timeline_start = yield self.get_state_at(
room_id, stream_position=now_token, state_filter=state_filter
)
@@ -1771,20 +1770,9 @@ def _generate_room_entry(
newly_joined_room=newly_joined,
)

if not batch and batch.limited:
# This resulted in #5407, which is weird, so lets log! We do it
# here as we have the maximum amount of information.
user_id = sync_result_builder.sync_config.user.to_string()
logger.info(
"Issue #5407: Found limited batch with no events. user %s, room %s,"
" sync_config %s, newly_joined %s, events %s, batch %s.",
user_id,
room_id,
sync_config,
newly_joined,
events,
batch,
)
# Note: `batch` can be both empty and limited here in the case where
# `_load_filtered_recents` can't find any events the user should see
# (e.g. due to having ignored the sender of the last 50 events).

if newly_joined:
# debug for https://github.com/matrix-org/synapse/issues/4422

0 comments on commit d514dac

Please sign in to comment.