Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live db migrations and recovery #49036

Merged
merged 5 commits into from Apr 12, 2021
Merged

Commits on Apr 11, 2021

  1. Run database migrations in the background after started event

    - Database migrations no longer block startup
    - The migration is started shortly after the started event since they are cpu intensive and we do not want to compete with startup.
    - Events are queued and processed when the migration is completed
    - There is a safety to start discarding events if more than 10000 happen before migration is completed
    - A notification is shown when the migration is in progress "The database is being upgraded. Integrations such as logbook and history that read the database may return inconsistent results until the migration completes."
    - The database recovery logic can now recover at point after setup including purge, migration, and event insert. In short we can _always_ (hopefully) recover and start a new db  without a restart.
    - The quick check is no longer performed on unclean shutdown since we can always recover live. The `db_integrity_check` option has been deprecated.
    bdraco committed Apr 11, 2021
    Copy the full SHA
    d9d7e91 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2021

  1. Update homeassistant/components/recorder/__init__.py

    Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
    bdraco and balloob committed Apr 12, 2021
    Copy the full SHA
    9dbbf87 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    ed87248 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    26582eb View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    c907be2 View commit details
    Browse the repository at this point in the history