-
Notifications
You must be signed in to change notification settings - Fork 169
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
mmap in chunks when running Group::compact() when necessary #2581
Comments
Perhaps? From what I can tell #1935 is more about mmapping the whole file still, just not necessarily contiguously. |
No, #1935 is about the very special requirement we currently have to mmap the entire file contiguously as the file opened. It's an obvious shortcoming which we have not been able to prioritize. |
Would it be easier to solve in the specific case of compact when we know there are no other readers or writers? Might be easier than solving the general case? If so, let's keep this open. Otherwise we can close as a duplicate. |
Nope, no low hanging fruit for this one. We have to do #1935. Closing this. |
We've seen cases in practice where Realm files have grown so large that they cannot be mmapped in their entirety all at once, which leaves users with very few options to recover that data.
Now that we officially expose
compact()
in Cocoa's public API (realm/realm-swift#4755), that provides for an escape hatch for some Realms to be shrunk to a size that can be mmapped.So if mmapping the file in its entirety fails, core could incrementally just map the section it cares about at a given time, read the required data from it, unmap it, then move on to the next section.
The text was updated successfully, but these errors were encountered: