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

Add more logging to debug slow startup #8264

Merged
merged 2 commits into from
Sep 7, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'release-v1.20.0' into rav/db_init_logging
  • Loading branch information
richvdh authored Sep 7, 2020
commit 9623bfb5237b32bbf4f76c426eabb4159281d386
6 changes: 6 additions & 0 deletions synapse/storage/prepare_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ def prepare_database(db_conn, database_engine, config, databases=["main", "state
)
else:
logger.info("%r: Initialising new database", databases)

# if it's a worker app, refuse to upgrade the database, to avoid multiple
# workers doing it at once.
if config and config.worker_app is not None:
raise UpgradeDatabaseException(EMPTY_DATABASE_ON_WORKER_ERROR)

_setup_new_database(cur, database_engine, databases=databases)

# check if any of our configured dynamic modules want a database
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.