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

Refactor storage layer to support multiple databases#6231

Merged
erikjohnston merged 11 commits intodevelopfrom
erikj/refactor_stores
Oct 23, 2019
Merged

Refactor storage layer to support multiple databases#6231
erikjohnston merged 11 commits intodevelopfrom
erikj/refactor_stores

Conversation

@erikjohnston
Copy link
Copy Markdown
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
Comment thread synapse/storage/data_stores/main/schema/delta/25/00background_updates.sql Outdated
Comment thread synapse/storage/prepare_database.py
Comment thread synapse/storage/prepare_database.py
Comment thread synapse/storage/prepare_database.py
Comment thread synapse/storage/prepare_database.py Outdated
Comment thread synapse/storage/prepare_database.py Outdated
Comment thread synapse/storage/prepare_database.py Outdated
Comment thread synapse/storage/README.md Outdated
@erikjohnston erikjohnston requested a review from richvdh October 22, 2019 17:46
Copy link
Copy Markdown
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