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

Move persist_events out from main data store. #6240

Merged
merged 6 commits into from
Oct 30, 2019

Conversation

erikjohnston
Copy link
Member

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.

Broadly I've just moved functions from the main data store up into an EventPersistenceStore and changed calls to storage functions to self.main_store.* and self.state_store.*

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.
@erikjohnston erikjohnston force-pushed the erikj/split_out_persistence_store branch from d008268 to ab581c2 Compare October 23, 2019 12:29
@erikjohnston
Copy link
Member Author

I'm currently fiddling to change the way we access the persistence store ftr

@erikjohnston erikjohnston force-pushed the erikj/split_out_persistence_store branch from ab581c2 to 9fb9688 Compare October 23, 2019 15:16
@erikjohnston
Copy link
Member Author

So the plan is broadly that all the new storage classes get added to the Storage class (accessed via get_storage) and that getting the main data store directly via get_datastore() is sort of deprecated?

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally lgtm, though it's not easy to see from the diff what's happening. A few requests for docstrings etc

synapse/server.py Outdated Show resolved Hide resolved
synapse/storage/data_stores/main/events.py Show resolved Hide resolved
synapse/storage/data_stores/main/events.py Outdated Show resolved Hide resolved
synapse/storage/data_stores/main/events.py Outdated Show resolved Hide resolved
@erikjohnston erikjohnston force-pushed the erikj/split_out_persistence_store branch from a73963e to ec6de1c Compare October 30, 2019 13:37
@erikjohnston erikjohnston merged commit b7fe62b into develop Oct 30, 2019
@erikjohnston erikjohnston deleted the erikj/split_out_persistence_store branch January 9, 2020 15:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants