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

Compact doesn't work with synced realms #2345

Closed
nirinchev opened this issue Dec 6, 2016 · 3 comments
Closed

Compact doesn't work with synced realms #2345

nirinchev opened this issue Dec 6, 2016 · 3 comments
Labels

Comments

@nirinchev
Copy link
Member

nirinchev commented Dec 6, 2016

When I open a synchronized Realm and call compact on it, I get a bad history type exception. After brief debugging with the help of @fealebenpae, we concluded that do_open is called at the end of compact, then in the if (Replication* repl = m_group.get_replication()), m_group is empty, so repl is always nullptr and the history_type is never set to the correct value.

@finnschiermer
Copy link
Contributor

It turns out to be a more complicated problem. Compact doesn't write out the history part of the Realm file. Apparently this confuses the later attempt to reopen the file as a synchronized realm.

@hsnetzer
Copy link

hsnetzer commented Feb 8, 2019

shouldCompactOnLaunch seems to work as a config option on my synced Realm on Realm Cloud.

@ironage
Copy link
Contributor

ironage commented Feb 8, 2019

@hsnetzer you're right, this issue was fixed by #3039 so it has been working for some time. We just forgot to close this issue, thanks for the reminder!

@ironage ironage closed this as completed Feb 8, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants