-
Notifications
You must be signed in to change notification settings - Fork 233
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
multi threads DbStoragePlainFile.createPaperDir() will throw new RuntimeException("Couldn't create Paper dir: " + mDbPath); #114
Comments
Thanks, now I see where the issue may happen. Did you see the issue it in your app? |
I believe a race condition in our app ran into this. We had a first operation that would complete, and then it would kick off a "save" on another thread (this "save" would A second operation would run immediately after the first operation and try to read by calling
Clearly the race condition we created in our app could have caused different, even harder-to-diagnose problems, even if this reported Issue didn't exist. Just wanted to share our experience. |
I see this crash happening in the beta version of my app with only a couple thousand users. I think "Reading/writing for different keys can be done in parallel" is not really safe at the moment. |
Happens to our SDK as well. The SDK is used to report analytic events, so it's definitely possible for 2 threads to use the database at the same time. |
@pilgr seems like bigkun suggested a correct fix 2 years ago, is this getting fixed? |
@wassil thanks but I'm already working on the fix, please review PR once it's ready |
Please review the PR with the fix #168 |
Fixed and merged to master, included in the new version 2.7.1 |
multi threads DbStoragePlainFile.createPaperDir() will throw new RuntimeException("Couldn't create Paper dir: " + mDbPath);
because “boolean isReady = new File(mDbPath).mkdirs();” will return false.
fix:
The text was updated successfully, but these errors were encountered: