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

Cannot write to a database on exFAT drive #6691

Closed
gangsports opened this issue Aug 6, 2020 · 4 comments · Fixed by realm/realm-core#3883
Closed

Cannot write to a database on exFAT drive #6691

gangsports opened this issue Aug 6, 2020 · 4 comments · Fixed by realm/realm-core#3883
Assignees

Comments

@gangsports
Copy link

gangsports commented Aug 6, 2020

Goals

Modify a realm database on an exFAT drive

Expected Results

The target realm database is saved or throws an exception

Actual Results

The program hangs due to realm.write never returning

Steps for others to Reproduce

Create a new realm database on exFAT causing the application hanging.

Some background:
I reported an issue that Realm cannot read the database on exFAT in #6508 and it was fixed in realm/realm-core#3733. I am able to open a saved Realm database on exFAT now as the fix indicates. However, I cannot write or modify.

By playing around a little with the source code, it seems tr.commit_and_continue_as_read(); in void RealmCoordinator::commit_write(Realm& realm) and realm->get_number_of_versions(); in static void check_can_create_write_transaction(const Realm* realm) never return.

Code Sample

override func createDatabase() throws {
        // realmFileURL is pointing to exFAT drive 
        let realm = try Realm(fileURL: realmFileURL)
        try realm.write {
            // insert any record or do nothing
        }
        print("Done") // This line is never called and the function never throws too.
}

Version of Realm and Tooling

Realm framework version: 5.3.2

Realm Object Server version: ?

Xcode version: Version 11.3.1 (11C505)

iOS/OSX version: ?

Dependency manager + version: ?

@gangsports
Copy link
Author

Hi people. Just wondering if any updates for this? Much appreciate it.

@tgoyne
Copy link
Member

tgoyne commented Aug 28, 2020

Running the core unit tests on an exFAT volume hits this issue, and there's a few other tests that fail as well. The good news is that it looks like that assuming I can get it to work it should be easy to test each filesystem on CI...

@tgoyne
Copy link
Member

tgoyne commented Aug 28, 2020

I made a PR to fix this and the core test suite at least now passes on exFAT.

@gangsports
Copy link
Author

Thanks so much for your update! Really appreciate it.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants