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

Fix #3169: Database race condition crash at startup. #3170

Merged
merged 1 commit into from
Jan 6, 2021
Merged

Conversation

iccub
Copy link
Contributor

@iccub iccub commented Jan 5, 2021

DataController internals were initialized after first DB operations,
Migration.launchMigrations were called first, on a background thread
which can result in race conditions.

I simply moved the DB initialization before launching migration code.

Summary of Changes

This pull request fixes #3169

Submitter Checklist:

  • Unit Tests are updated to cover new or changed functionality
  • User-facing strings use NSLocalizableString()

Test Plan:

Screenshots:

Reviewer Checklist:

  • Issues include necessary QA labels:
    • QA/(Yes|No)
    • release-notes/(include|exclude)
    • bug / enhancement
  • Necessary security reviews have taken place.
  • Adequate unit test coverage exists to prevent regressions.
  • Adequate test plan exists for QA to validate (if applicable).
  • Issue is assigned to a milestone (should happen at merge time).

`DataController` internals were initialized after first DB operations,
`Migration.launchMigrations` were called first, on a background thread
which can result in race conditions.
@iccub iccub requested a review from a team January 5, 2021 09:44
@iccub iccub merged commit 55b2857 into development Jan 6, 2021
@iccub iccub deleted the bugfix/3169 branch January 6, 2021 15:19
iccub added a commit that referenced this pull request Jan 13, 2021
`DataController` internals were initialized after first DB operations,
`Migration.launchMigrations` were called first, on a background thread
which can result in race conditions.
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.

Startup database crash
3 participants