Skip to content

mmap in chunks when running Group::compact() when necessary #2581

@jpsim

Description

@jpsim

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions