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

Add database config class #6481

Closed
wants to merge 10 commits into from
Closed

Add database config class #6481

wants to merge 10 commits into from

Conversation

erikjohnston
Copy link
Member

@erikjohnston erikjohnston commented Dec 5, 2019

This will make it easier to a) pass a single Database object to different data stores and b) have separate database configs

Based on #6469 and #6487. Commits independently reviewable.

@erikjohnston erikjohnston force-pushed the erikj/database_config branch 8 times, most recently from 6ef3e04 to 90b3d1c Compare December 6, 2019 13:24
@erikjohnston erikjohnston changed the title Add database config class and thread through Database object Add database config class Dec 6, 2019
@erikjohnston erikjohnston force-pushed the erikj/database_config branch 9 times, most recently from 33f4642 to c9226c6 Compare December 6, 2019 17:42
@richvdh richvdh self-assigned this Dec 10, 2019
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.

I'm giving up at this point, I'm afraid.

I don't think you can claim that the commits are independently reviewable when they have interdependencies: I might as well review the whole diff at once, and it's pretty big for that.

Basically I'd love it if you could split this up.

synapse/config/database.py Show resolved Hide resolved
synapse/config/database.py Show resolved Hide resolved
synapse/config/database.py Show resolved Hide resolved
synapse/config/database.py Show resolved Hide resolved
synapse/server.py Show resolved Hide resolved
@@ -41,7 +41,7 @@ class UpgradeDatabaseException(PrepareDatabaseException):
pass


def prepare_database(db_conn, database_engine, config):
def prepare_database(db_conn, database_engine, config, data_stores=["main"]):
Copy link
Member

Choose a reason for hiding this comment

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

docstring for data_stores?

(do we really need the default value?)

synapse/storage/_base.py Show resolved Hide resolved
synapse/server.py Show resolved Hide resolved
synapse/server.py Show resolved Hide resolved
tests/replication/slave/storage/_base.py Show resolved Hide resolved
@erikjohnston
Copy link
Member Author

Well, OK. I thought the changes were independent enough where it'd be easier to review, but will try and do something

@erikjohnston erikjohnston deleted the erikj/database_config 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