From 2189feb64047fdfa711bb77785371331535ba2a9 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Mon, 18 Jun 2018 10:02:01 -0700 Subject: [PATCH] Allow setting shouldCompactOnLaunch on synchronized Realms --- CHANGELOG.md | 22 ++++++++++++++++++++++ src/js_realm.hpp | 3 --- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7302d0ea..a9c3579b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,25 @@ +X.Y.Z Release notes +============================================================= +### Compatibility +* Sync protocol: 24 +* Server-side history format: 4 +* File format: 7 +* Realm Object Server: 3.0.0 or later + +### Breaking changes +* None. + +### Enhancements +* Added support for compacting synchronized Realms and allowed setting the + `shouldCompactOnLaunch` config property for them. + +### Bug fixes +* None. + +### Internals +* None. + + 2.8.5 Release notes (2018-6-18) ============================================================= ### Compatibility diff --git a/src/js_realm.hpp b/src/js_realm.hpp index 9e1f58aa..fea2206f 100644 --- a/src/js_realm.hpp +++ b/src/js_realm.hpp @@ -516,9 +516,6 @@ void RealmClass::constructor(ContextType ctx, ObjectType this_object, size_t if (config.schema_mode == SchemaMode::Immutable) { throw std::invalid_argument("Cannot set 'shouldCompactOnLaunch' when 'readOnly' is set."); } - if (config.sync_config) { - throw std::invalid_argument("Cannot set 'shouldCompactOnLaunch' when 'sync' is set."); - } FunctionType should_compact_on_launch_function = Value::validated_to_function(ctx, compact_value, "shouldCompactOnLaunch"); config.should_compact_on_launch_function = [=](uint64_t total_bytes, uint64_t unused_bytes) {