summary refs log tree commit diff
path: root/synapse/storage/persist_events.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Patrick Cloke2020-02-211-4/+4
| | | | Ensure good comprehension hygiene using flake8-comprehensions.
* Increase DB/CPU perf of `_is_server_still_joined` check. (#6936)Erik Johnston2020-02-191-15/+28
| | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Reduce amount of logging at INFO level. (#6862)Erik Johnston2020-02-061-1/+1
| | | | | | | | A lot of the things we log at INFO are now a bit superfluous, so lets make them DEBUG logs to reduce the amount we log by default. Co-Authored-By: Brendan Abolivier <babolivier@matrix.org> Co-authored-by: Brendan Abolivier <github@brendanabolivier.com>
* s/get_room_version/get_room_version_id/Richard van der Hoff2020-01-311-1/+1
| | | | | ... to make way for a forthcoming get_room_version which returns a RoomVersion object.
* When server leaves room check for stale device lists. (#6801)Erik Johnston2020-01-301-4/+47
| | | | | | | | | When a server leaves a room it may stop sharing a room with remote users, and thus not get any updates to their device lists. So we need to check for this case and delete those device lists from the cache. We don't need to do this if we stop sharing a room because the remote user leaves the room, because we track that case via looking at membership changes.
* Delete current state when server leaves a room (#6792)Erik Johnston2020-01-291-3/+86
| | | | | | Otherwise its just stale data, which may get deleted later anyway so can't be relied on. It's also a bit of a shotgun if we're trying to get the current state of a room we're not in.
* Add a DeltaState to track changes to be made to current state (#6716)Erik Johnston2020-01-201-55/+68
|
* Split state groups into a separate data store (#6296)Erik Johnston2019-12-201-1/+1
|
* Merge pull request #6294 from matrix-org/erikj/add_state_storageErik Johnston2019-10-311-1/+1
|\ | | | | Add StateGroupStorage interface
| * Add StateGroupStorage interfaceErik Johnston2019-10-301-1/+1
| |
* | fix delete_existing for _persist_events (#6300)Richard van der Hoff2019-10-301-4/+1
|/ | | this is part of _retry_on_integrity_error, so should only be on _persist_events_and_state_updates
* Review commentsErik Johnston2019-10-301-3/+10
|
* Add DataStores and Storage classes.Erik Johnston2019-10-231-3/+4
|
* Move persist_events out from main data store.Erik Johnston2019-10-231-0/+644
This is in preparation for splitting out of state_groups_state from the main store into it own one, as persisting events depends on calculating state.