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

Disabling sync/compact combo #3899

Merged
merged 3 commits into from
Dec 15, 2016
Merged

Disabling sync/compact combo #3899

merged 3 commits into from
Dec 15, 2016

Conversation

kneth
Copy link
Member

@kneth kneth commented Dec 13, 2016

Due to realm/realm-core#2345 we need to disable Realm.compactRealm() when the Realm is sync'ed.

@kneth kneth assigned kneth and unassigned kneth Dec 13, 2016
@kneth kneth added the S:Review label Dec 13, 2016
Copy link
Contributor

@beeender beeender left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Collaborator

@nhachicha nhachicha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comment

*/
public static boolean compactRealm(RealmConfiguration configuration) {
// FIXME: remove this restriction when https://github.com/realm/realm-core/issues/2345 is resolved
if (configuration.isSyncConfiguration()) {
throw new IllegalArgumentException("You cannot compact a sync'ed Realm.");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about UnsupportedOperationException("Compacting is not supported yet on synced Realm. see https://github.com/realm/realm-core/issues/2345");?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's much better. Thanks.

@kneth kneth merged commit c20b487 into releases Dec 15, 2016
@kneth kneth deleted the kneth/sync-disallow-compact branch December 15, 2016 14:19
@kneth kneth removed the S:Review label Dec 15, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants