forked-synapse/synapse/storage/data_stores/main
Erik Johnston 0d0bc35792
Increase DB/CPU perf of _is_server_still_joined check. (#6936)
* Increase DB/CPU perf of `_is_server_still_joined` check.

For rooms with large amount of state a single user leaving could cause
us to go and load a lot of membership events and then pull out
membership state in a large number of batches.

* Newsfile

* Update synapse/storage/persist_events.py

Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Fix adding if too soon

* Update docstring

* Review comments

* Woops typo

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2020-02-19 10:15:49 +00:00
..
schema wait for current_state_events_membership before delete_old_current_state_events (#6924) 2020-02-17 11:30:50 +00:00
__init__.py Fix GET request on /_synapse/admin/v2/users endpoint (#6563) 2020-01-08 13:26:40 +00:00
account_data.py Merge pull request #6487 from matrix-org/erikj/pass_in_db 2019-12-09 13:53:21 +00:00
appservice.py Change DataStores to accept 'database' param. 2019-12-06 13:30:06 +00:00
cache.py Propagate cache invalidates from workers to other workers. (#6748) 2020-01-27 13:47:50 +00:00
client_ips.py Add database config class (#6513) 2019-12-18 10:45:12 +00:00
deviceinbox.py Add delta file to fix missing default table data (#6555) 2019-12-18 11:13:33 +00:00
devices.py Merge pull request #6844 from matrix-org/uhoreg/cross_signing_fix_device_fed 2020-02-05 10:54:49 +00:00
directory.py Move DB pool and helper functions into dedicated Database class 2019-12-05 10:46:37 +00:00
e2e_room_keys.py Move DB pool and helper functions into dedicated Database class 2019-12-05 10:46:37 +00:00
end_to_end_keys.py look up cross-signing keys from the DB in bulk (#6486) 2019-12-12 12:03:28 -05:00
event_federation.py Limit size of get_auth_chain_ids query (#6947) 2020-02-19 09:39:26 +00:00
event_push_actions.py Change DataStores to accept 'database' param. 2019-12-06 13:30:06 +00:00
events_bg_updates.py Drop unused index 2019-12-10 12:46:14 +00:00
events_worker.py Make 'event.redacts' never raise. (#6771) 2020-01-23 15:19:03 +00:00
events.py Delete current state when server leaves a room (#6792) 2020-01-29 11:01:32 +00:00
filtering.py Move DB pool and helper functions into dedicated Database class 2019-12-05 10:46:37 +00:00
group_server.py Allow moving group read APIs to workers (#6866) 2020-02-07 11:14:19 +00:00
keys.py move batch_iter to a separate module 2020-01-16 22:25:32 +00:00
media_repository.py Change DataStores to accept 'database' param. 2019-12-06 13:30:06 +00:00
monthly_active_users.py Fix setting mau_limit_reserved_threepids config (#6793) 2020-01-28 13:05:24 +00:00
openid.py Move DB pool and helper functions into dedicated Database class 2019-12-05 10:46:37 +00:00
presence.py move batch_iter to a separate module 2020-01-16 22:25:32 +00:00
profile.py Move DB pool and helper functions into dedicated Database class 2019-12-05 10:46:37 +00:00
push_rule.py Change EventContext to use the Storage class (#6564) 2019-12-20 10:32:02 +00:00
pusher.py Clean up startup for the pusher (#6558) 2019-12-18 14:26:58 +00:00
receipts.py Change DataStores to accept 'database' param. 2019-12-06 13:30:06 +00:00
registration.py Remove unnecessary abstractions in admin handler (#6751) 2020-01-22 15:09:57 +00:00
rejections.py Move DB pool and helper functions into dedicated Database class 2019-12-05 10:46:37 +00:00
relations.py Move DB pool and helper functions into dedicated Database class 2019-12-05 10:46:37 +00:00
room.py Add rooms.room_version column (#6729) 2020-01-27 14:30:57 +00:00
roommember.py Increase DB/CPU perf of _is_server_still_joined check. (#6936) 2020-02-19 10:15:49 +00:00
search.py Fix redacted events being returned in search results ordered by "recent" (#6522) 2019-12-12 15:53:49 +00:00
signatures.py Move DB pool and helper functions into dedicated Database class 2019-12-05 10:46:37 +00:00
state_deltas.py Move DB pool and helper functions into dedicated Database class 2019-12-05 10:46:37 +00:00
state.py Add get_room_version method 2020-01-31 10:28:15 +00:00
stats.py Remove unused get_room_stats_state method. (#6869) 2020-02-07 15:30:26 +00:00
stream.py Fixup diff 2020-01-16 20:25:09 +00:00
tags.py Move DB pool and helper functions into dedicated Database class 2019-12-05 10:46:37 +00:00
transactions.py Change DataStores to accept 'database' param. 2019-12-06 13:30:06 +00:00
user_directory.py Reduce amount of logging at INFO level. (#6862) 2020-02-06 13:31:05 +00:00
user_erasure_store.py Move DB pool and helper functions into dedicated Database class 2019-12-05 10:46:37 +00:00