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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: on iOS db locked error #827

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jackleemeta
Copy link
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
Copy link
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
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