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

WIP: Dmr/unblock catchup #15228

Closed
wants to merge 8 commits into from
Closed
Changes from 1 commit
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
15 changes: 7 additions & 8 deletions synapse/visibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,14 +643,13 @@ def check_event_is_visible(
# this check but would base the filtering on an outdated view of the membership events.

partial_state_invisible_events = set()
if filter_out_erased_senders:
Copy link
Contributor Author

@DMRobertson DMRobertson Mar 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I missing something here? Why was the original logic doing this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have put some comments regarding that in the original PR.
We perhaps want to use a dedicated boolean like filter_partial_state for this (and keep your rename to filter_out_erased_senders for the rest of the code).
I think the logic I had in mind is that we don't care about having non local events when checking if we should use an event as an extremity for backfill: the remote server would then filter on his side anyway what need to be filtered, with a (potentially) a more current view than the joining server.

for e in events:
sender_domain = get_domain_from_id(e.sender)
if (
sender_domain != local_server_name
and await storage.main.is_partial_state_room(e.room_id)
):
partial_state_invisible_events.add(e)
for e in events:
sender_domain = get_domain_from_id(e.sender)
if (
sender_domain != local_server_name
and await storage.main.is_partial_state_room(e.room_id)
):
partial_state_invisible_events.add(e)

# Let's check to see if all the events have a history visibility
# of "shared" or "world_readable". If that's the case then we don't
Expand Down