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

Fatal 'Failed to upgrade database' error on startup #6569

Closed
richvdh opened this issue Dec 19, 2019 · 2 comments
Closed

Fatal 'Failed to upgrade database' error on startup #6569

richvdh opened this issue Dec 19, 2019 · 2 comments

Comments

@richvdh
Copy link
Member

richvdh commented Dec 19, 2019

As of Synapse 1.7.0, when I start synapse with an old database version, I get this rather cryptic error.

@richvdh
Copy link
Member Author

richvdh commented Dec 19, 2019

I believe this only affects sqlite. I think it was introduced by #6487, which moves this code which calls prepare_database using a connection that was created with run_new_connection=False into Datastore where it is called on a connection which has had the on_new_connection method handler called.

The sqlite engine, for reasons better known to itself, calls prepare_database in its on_new_connection: https://github.com/matrix-org/synapse/blob/v1.7.0/synapse/storage/engines/sqlite.py#L62.

@richvdh
Copy link
Member Author

richvdh commented Dec 19, 2019

turns out this is already fixed by #6513 on develop.

@richvdh richvdh closed this as completed Dec 19, 2019
richvdh added a commit that referenced this issue Dec 20, 2019
Only run prepare_database on connection for in-memory databases.

Fixes #6569.
richvdh added a commit that referenced this issue Dec 20, 2019
Only run prepare_database on connection for in-memory databases.

Fixes #6569.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant