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

Use the chain cover index in get_auth_chain_ids #9576

Merged
merged 8 commits into from
Mar 10, 2021
Merged
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
Prev Previous commit
Next Next commit
Clarify comments.
  • Loading branch information
clokep committed Mar 9, 2021
commit 6dc3f8a3dbfc86d91412981c0e601372f4434798
5 changes: 2 additions & 3 deletions synapse/storage/databases/main/event_federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ def _get_auth_chain_ids_using_cover_index_txn(
) -> List[str]:
"""Calculates the auth chain IDs using the chain index."""

# First we look up the chain ID/sequence numbers for all the events, and
# work out the chain/sequence numbers reachable from each state set.
# First we look up the chain ID/sequence numbers for the given events.

initial_events = set(event_ids)

Expand Down Expand Up @@ -158,7 +157,7 @@ def _get_auth_chain_ids_using_cover_index_txn(
raise _NoChainCoverIndex(room_id)

# Now we look up all links for the chains we have, adding chains that
# are reachable from each set.
# are reachable from any event.
sql = """
SELECT
origin_chain_id, origin_sequence_number,
Expand Down