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 possible deadlock caused by internal synchronization in SQLiteDatabase #482

Merged
merged 1 commit into from
Aug 5, 2015

Conversation

artem-zinnatullin
Copy link
Member

Relolves #481.

At the moment, StorIOSQLite Operations already written in such way that they send notifications after transaction, so I just moved calls to SQLiteDatabase transactions out of the synchronization and keep code that manages notifications as is.

@nikitin-da and @tadas-subonis please take a look and comment!

deadlocksgoaway

@tadas-subonis
Copy link

Well, it at least should solve the issue that I've reported earlier. Not sure about the notifications you mentioned earlier.

Thanks!

@tadas-subonis
Copy link

It might be worth adding some tests using https://code.google.com/p/thread-weaver/wiki/UsersGuide

nikitin-da added a commit that referenced this pull request Aug 5, 2015
…lock

Fix possible deadlock caused by internal synchronization in SQLiteDatabase
@nikitin-da nikitin-da merged commit 7f75f71 into master Aug 5, 2015
@nikitin-da nikitin-da deleted the default-storio-sqlite-deadlock branch August 5, 2015 13:56
@artem-zinnatullin
Copy link
Member Author

We can not cover this with tests properly, because implementation of SQLiteDatabase may be changed in any version of Android SDK and we are using Robolectric for test with its own impl…

But, I'll think about more multithreading tests, our integration tests use multithreading BTW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants