From 12efcd74d221d30d6a39ea80160ca112ef8c782b Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 28 Jun 2022 11:46:10 +0100 Subject: [PATCH] Update synapse/storage/databases/main/event_push_actions.py Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --- synapse/storage/databases/main/event_push_actions.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/synapse/storage/databases/main/event_push_actions.py b/synapse/storage/databases/main/event_push_actions.py index f1e4ba398a22..58d011395a6b 100644 --- a/synapse/storage/databases/main/event_push_actions.py +++ b/synapse/storage/databases/main/event_push_actions.py @@ -840,7 +840,12 @@ async def _rotate_notifs(self) -> None: self._doing_notif_rotation = False def _handle_new_receipts_for_notifs_txn(self, txn: LoggingTransaction) -> bool: - """Check for new read receipts and delete from event push actions.""" + """Check for new read receipts and delete from event push actions. + + Any push actions which predate the user's most recent read receipt are + now redundant, so we can remove them from `event_push_actions` and + update `event_push_summary`. + """ limit = 100