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

Commit 5973a54

Browse files
committed
Update comment about notifying cache changes on workers when changing rejection status
1 parent 292451f commit 5973a54

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

synapse/storage/databases/main/events_worker.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2386,6 +2386,9 @@ def mark_event_rejected_txn(
23862386
23872387
This can happen, for example, when resyncing state during a faster join.
23882388
2389+
It is the caller's responsibility to ensure that other workers are
2390+
sent a notification so that they call `_invalidate_local_get_event_cache()`.
2391+
23892392
Args:
23902393
txn:
23912394
event_id: ID of event to update
@@ -2424,14 +2427,3 @@ def mark_event_rejected_txn(
24242427
)
24252428

24262429
self.invalidate_get_event_cache_after_txn(txn, event_id)
2427-
2428-
# TODO(faster_joins): invalidate the cache on workers. Ideally we'd just
2429-
# call '_send_invalidation_to_replication', but we actually need the other
2430-
# end to call _invalidate_local_get_event_cache() rather than (just)
2431-
# _get_event_cache.invalidate().
2432-
#
2433-
# One solution might be to (somehow) get the workers to call
2434-
# _invalidate_caches_for_event() (though that will invalidate more than
2435-
# strictly necessary).
2436-
#
2437-
# https://github.com/matrix-org/synapse/issues/12994

0 commit comments

Comments
 (0)