-
Notifications
You must be signed in to change notification settings - Fork 234
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
io.paperdb.PaperDbException: Couldn't rename file #77
Comments
Could you provide a more detailed stack trace? |
W/System.err: io.paperdb.PaperDbException: Couldn't rename file /data/user/0/com.redtaxi.driver/files/io.paperdb/travelTime.pt to backup file /data/user/0/ |
Paper renames the original file to file "*.bak" on writing attempt to have a way to recover in case if writing is failed. How often does issue happen? Can you provide a test case or a sample code to reproduce it? |
I'm using Paper.book().read() and Paper.book().write() throughout the app. My app also have two services running in background which also uses the above methods. Will this cause the issue? |
Two services running in one process or in different processes? Paper doesn't support data consistency when accessed from different processes. |
They are running in two separate processes. How to handle this? Please suggest me a solution. |
Keep all the code accessing Paper in one process, let's say the main process where Paper can be accessed from activities and services. This main process should expose Binder interface with all the necessary API to get data. So another process can use Binder interface to access data without knowing anything about Paper underhood. |
What is the reason for this exception and how to handle this?
The text was updated successfully, but these errors were encountered: