Skip to content

fix: on iOS db locked error#827

Open
jackleemeta wants to merge 5 commits intofluttercommunity:masterfrom
jackleemeta:fix/db_locked_error
Open

fix: on iOS db locked error#827
jackleemeta wants to merge 5 commits intofluttercommunity:masterfrom
jackleemeta:fix/db_locked_error

Conversation

@jackleemeta
Copy link
Copy Markdown
Contributor

@jackleemeta jackleemeta commented Mar 2, 2023

Ignore previous comments.

Failure causes:

  1. The cause of the failure was the creation of two FlutterDownloaderPlugin, main plugin and background isolate plugin. Since dispatch_queue_t databaseQueue is instance object, two queues were also created with the plugins, there are also two queues to access the database so that data race in database.

  2. loadDataFromDB in loadTaskWithId is exposed on any queue.

Current

Queue

Fixed

Thread

@jackleemeta jackleemeta requested a review from bartekpacia as a code owner March 2, 2023 11:41
@jackleemeta
Copy link
Copy Markdown
Contributor Author

jackleemeta commented Mar 2, 2023

Related issues:

#16
#93
#624
#842

… background isolate plugin 2. loadDataFromDB in `loadTaskWithId` safely
…`, because the front lines return when `openDatabaseResult != SQLITE_OK`
@jackleemeta
Copy link
Copy Markdown
Contributor Author

Hi @salmaahhmed , would you mind reviewing the pr sometime? My project is still troubled by the problem, others may also be so. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant