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

Refactor storage layer to support multiple databases #6231

Merged
merged 11 commits into from
Oct 23, 2019

Conversation

erikjohnston
Copy link
Member

@erikjohnston erikjohnston commented Oct 21, 2019

This is an initial refactor that starts the split out of DataStore into the concept of "data stores". Broadly, this moves all the stores in synapse.storage into synapse.storage.data_stores.main and fixes up prepare_database to correctly apply schemas from multiple data stores.

The commits should be independently reviewable. The first one is the big one, and is the moving of files. The only changes are that helper classes/exceptions/etc that are imported from outside synapse.storage get left in synapse.storage rather than getting moved into a data store (the aim being that things outside storage rarely if ever need to know about the concept of data stores).

Currently this still exports the same DataStore in synapse.storage, but splitting that out some more is a job for a separate PR

@erikjohnston erikjohnston marked this pull request as ready for review October 22, 2019 10:49
@erikjohnston erikjohnston force-pushed the erikj/refactor_stores branch from 402067b to acf47c7 Compare October 22, 2019 10:55
@erikjohnston erikjohnston requested a review from a team October 22, 2019 10:57
synapse/storage/prepare_database.py Show resolved Hide resolved
synapse/storage/prepare_database.py Show resolved Hide resolved
synapse/storage/prepare_database.py Show resolved Hide resolved
synapse/storage/prepare_database.py Outdated Show resolved Hide resolved
synapse/storage/prepare_database.py Outdated Show resolved Hide resolved
synapse/storage/prepare_database.py Outdated Show resolved Hide resolved
synapse/storage/README.md Outdated Show resolved Hide resolved
@erikjohnston erikjohnston requested a review from richvdh October 22, 2019 17:46
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.

lgtm

@erikjohnston erikjohnston merged commit 7b6d99f into develop Oct 23, 2019
@erikjohnston erikjohnston deleted the erikj/refactor_stores branch January 9, 2020 15:48
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