forked-synapse/synapse
Erik Johnston 0d1d3e0708
Speed up get_unread_event_push_actions_by_room (#13005)
Fixes #11887 hopefully.

The core change here is that `event_push_summary` now holds a summary of counts up until a much more recent point, meaning that the range of rows we need to count in `event_push_actions` is much smaller.

This needs two major changes:
1. When we get a receipt we need to recalculate `event_push_summary` rather than just delete it
2. The logic for deleting `event_push_actions` is now divorced from calculating `event_push_summary`.

In future it would be good to calculate `event_push_summary` while we persist a new event (it should just be a case of adding one to the relevant rows in `event_push_summary`), as that will further simplify the get counts logic and remove the need for us to periodically update `event_push_summary` in a background job.
2022-06-15 15:17:14 +00:00
..
_scripts Speed up get_unread_event_push_actions_by_room (#13005) 2022-06-15 15:17:14 +00:00
api Fix a long-standing bug which meant that rate limiting was not restrictive enough in some cases. (#13018) 2022-06-15 14:11:55 +00:00
app Don't use keyword arguments when initialising modules (#13060) 2022-06-15 15:36:16 +02:00
appservice Remove remaining bits of groups code. (#12936) 2022-06-01 09:41:25 -04:00
config Remove code generating comments in configuration file (#12941) 2022-06-14 07:53:42 -07:00
crypto Bump black and click versions (#12320) 2022-04-05 11:04:28 +01:00
events Uniformize spam-checker API, part 4: port other spam-checker callbacks to return Union[Allow, Codes]. (#12857) 2022-06-13 18:16:16 +00:00
federation Stop depending on room_id to be returned for children state in the hierarchy response. (#12991) 2022-06-10 07:15:51 -04:00
handlers Speed up get_unread_event_push_actions_by_room (#13005) 2022-06-15 15:17:14 +00:00
http Fix destination_is errors seen in sentry. (#13041) 2022-06-14 18:28:26 +01:00
logging Easy type hints in synapse.logging.opentracing (#12894) 2022-05-27 11:17:33 +01:00
metrics Fix Synapse git info missing in version strings (#12973) 2022-06-07 15:24:11 +01:00
module_api Uniformize spam-checker API, part 4: port other spam-checker callbacks to return Union[Allow, Codes]. (#12857) 2022-06-13 18:16:16 +00:00
push Speed up get_unread_event_push_actions_by_room (#13005) 2022-06-15 15:17:14 +00:00
replication Remove groups replication code. (#12900) 2022-05-31 13:04:08 -04:00
res Fix Jinja templating error when generating thumbnail URLs. (#12510) 2022-04-20 12:03:03 -04:00
rest Fix destination_is errors seen in sentry. (#13041) 2022-06-14 18:28:26 +01:00
server_notices Decouple synapse.api.auth_blocking.AuthBlocking from synapse.api.auth.Auth. (#13021) 2022-06-14 09:51:15 +01:00
spam_checker_api Fix import in module_api module and docs on the new check_event_for_spam signature (#12918) 2022-05-31 12:04:53 +02:00
state Track a histogram of state res durations (#13036) 2022-06-15 15:19:49 +01:00
static
storage Speed up get_unread_event_push_actions_by_room (#13005) 2022-06-15 15:17:14 +00:00
streams Rework stream token to stop caring about groups. (#12897) 2022-05-31 07:42:50 -04:00
util Move the "email unsubscribe" resource, refactor the macaroon generator & simplify the access token verification logic. (#12986) 2022-06-14 09:12:08 -04:00
__init__.py Fix Synapse git info missing in version strings (#12973) 2022-06-07 15:24:11 +01:00
event_auth.py Remove room_version param from check_auth_rules_for_event 2022-06-12 23:13:10 +01:00
notifier.py Reduce the amount of state we pull from the DB (#12811) 2022-06-06 09:24:12 +01:00
py.typed
server.py Move the "email unsubscribe" resource, refactor the macaroon generator & simplify the access token verification logic. (#12986) 2022-06-14 09:12:08 -04:00
types.py Fix destination_is errors seen in sentry. (#13041) 2022-06-14 18:28:26 +01:00
visibility.py Fix 404 on /sync when the last event is a redaction of an unknown/purged event (#12905) 2022-06-01 11:29:51 +00:00