Closed htetlynnhtun closed 4 months ago
➤ PM Bot commented:
Jira ticket: RDART-1057
This likely means you're trying to open an in-memory realm at the same path as a persisted realm file. While the in-memory realm doesn't store data on disk, it still creates a file that is used for cross-process synchronization.
This likely means you're trying to open an in-memory realm at the same path as a persisted realm file. While the in-memory realm doesn't store data on disk, it still creates a file that is used for cross-process synchronization.
For test using Configuration.local
, I set a different realm file name as guided here.
And delete realm instance after each test. The problem is gone. Thank you. But still someRandomName.realm.lock files are left. Any suggestion to clean up those files? And should I still override defaultRealmName for inMemory instances if I already override it for local instances?
The .lock
file will not be deleted by Realm because it's what's used to synchronize access across processes and can't be safely removed. Since you know there's no other process accessing these files, you should be able to delete it yourself with no risk involved.
What happened?
I have 1 unit test and 1 integration test using
Realm
instance.InMemory
config for unit test andLocal
config for integration test. Tests are passing if both of them run one by one. Tests started to fail if both of them run concurrently with errorDurability not consistent. Error code: 1007.
Repro steps
https://github.com/htetlynnhtun/realm_test
Version
3.22.2
What Atlas Services are you using?
Local Database only
What type of application is this?
Flutter Application
Client OS and version
Mac 14.5
Code snippets
No response
Stacktrace of the exception/crash you're getting
Relevant log output
No response