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

Commit

Permalink
Remove debug logging for #4422
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robertson committed Jan 5, 2022
1 parent 3b51c76 commit 829f94d
Showing 1 changed file with 1 addition and 37 deletions.
38 changes: 1 addition & 37 deletions synapse/handlers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@

logger = logging.getLogger(__name__)

# Debug logger for https://github.com/matrix-org/synapse/issues/4422
issue4422_logger = logging.getLogger("synapse.handler.sync.4422_debug")


# Counts the number of times we returned a non-empty sync. `type` is one of
# "initial_sync", "full_state_sync" or "incremental_sync", `lazy_loaded` is
# "true" or "false" depending on if the request asked for lazy loaded members or
Expand Down Expand Up @@ -1161,13 +1157,8 @@ async def generate_sync_result(

num_events = 0

# debug for https://github.com/matrix-org/synapse/issues/4422
# debug for https://github.com/matrix-org/synapse/issues/9424
for joined_room in sync_result_builder.joined:
room_id = joined_room.room_id
if room_id in newly_joined_rooms:
issue4422_logger.debug(
"Sync result for newly joined room %s: %r", room_id, joined_room
)
num_events += len(joined_room.timeline.events)

log_kv(
Expand Down Expand Up @@ -1740,18 +1731,6 @@ async def _get_rooms_changed(
old_mem_ev_id, allow_none=True
)

# debug for #4422
if has_join:
prev_membership = None
if old_mem_ev:
prev_membership = old_mem_ev.membership
issue4422_logger.debug(
"Previous membership for room %s with join: %s (event %s)",
room_id,
prev_membership,
old_mem_ev_id,
)

if not old_mem_ev or old_mem_ev.membership != Membership.JOIN:
newly_joined_rooms.append(room_id)

Expand Down Expand Up @@ -1893,13 +1872,6 @@ async def _get_rooms_changed(
upto_token=since_token,
)

if newly_joined:
# debugging for https://github.com/matrix-org/synapse/issues/4422
issue4422_logger.debug(
"RoomSyncResultBuilder events for newly joined room %s: %r",
room_id,
entry.events,
)
room_entries.append(entry)

return _RoomChanges(
Expand Down Expand Up @@ -2077,14 +2049,6 @@ async def _generate_room_entry(
# `_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
issue4422_logger.debug(
"Timeline events after filtering in newly-joined room %s: %r",
room_id,
batch,
)

# When we join the room (or the client requests full_state), we should
# send down any existing tags. Usually the user won't have tags in a
# newly joined room, unless either a) they've joined before or b) the
Expand Down

0 comments on commit 829f94d

Please sign in to comment.