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

Faster joins: persist to database #12012

Merged
merged 8 commits into from
Mar 1, 2022
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
Add a robustness check for partial-stated outliers
  • Loading branch information
richvdh committed Feb 23, 2022
commit 446fae61fcb71dbebbb9fae60da3aa17fcc21851
8 changes: 8 additions & 0 deletions synapse/storage/databases/main/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -2142,6 +2142,14 @@ def _store_event_state_mappings_txn(
state_groups = {}
for event, context in events_and_contexts:
if event.internal_metadata.is_outlier():
# double-check that we don't have any events that claim to be outliers
# *and* have partial state (which is meaningless: we should have no
# state at all for an outlier)
if context.partial_state:
raise ValueError(
"Outlier event %s claims to have partial state", event.event_id
)

continue

# if the event was rejected, just give it the same state as its
Expand Down