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

Commit

Permalink
Update comment about notifying cache changes on workers when changing…
Browse files Browse the repository at this point in the history
… rejection status
  • Loading branch information
reivilibre committed Dec 6, 2022
1 parent 3005d9b commit 33c86ef
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions synapse/storage/databases/main/events_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2386,6 +2386,9 @@ def mark_event_rejected_txn(
This can happen, for example, when resyncing state during a faster join.
It is the caller's responsibility to ensure that other workers are
sent a notification so that they call `_invalidate_local_get_event_cache()`.
Args:
txn:
event_id: ID of event to update
Expand Down Expand Up @@ -2424,14 +2427,3 @@ def mark_event_rejected_txn(
)

self.invalidate_get_event_cache_after_txn(txn, event_id)

# TODO(faster_joins): invalidate the cache on workers. Ideally we'd just
# call '_send_invalidation_to_replication', but we actually need the other
# end to call _invalidate_local_get_event_cache() rather than (just)
# _get_event_cache.invalidate().
#
# One solution might be to (somehow) get the workers to call
# _invalidate_caches_for_event() (though that will invalidate more than
# strictly necessary).
#
# https://github.com/matrix-org/synapse/issues/12994

0 comments on commit 33c86ef

Please sign in to comment.