Skip to content

Releases: realm/realm-core

Realm Core v14.0.0-beta.0

27 Nov 16:08
Compare
Choose a tag to compare
Pre-release

Enhancements

  • Storage of Decimal128 properties has been optimised so that the individual values will take up 0 bits (if all nulls), 32 bits, 64 bits or 128 bits depending on what is needed. (PR [#6111]#6111))
  • You can have a collection embedded in any Mixed property (except Set).
  • Querying a specific entry in a collection (in particular 'first and 'last') is supported. (PR #4269)
  • Index on list of strings property now supported (PR #7142)
  • You can set the threshold levels for trace output on individual categories. (PR #7004)

Fixed

  • Align dictionaries to Lists and Sets when they get cleared. (#6205, since v10.4.0)
  • Fixed equality queries on a Mixed property with an index possibly returning the wrong result if values of different types happened to have the same StringIndex hash. (6407 since v11.0.0-beta.5).
  • If you have more than 8388606 links pointing to one specific object, the program will crash. (#6577, since v6.0.0)
  • Query for NULL value in Dictionary would give wrong results ([6748])(#6748), since v10.0.0)
  • A Realm generated on a non-apple ARM 64 device and copied to another platform (and vice-versa) were non-portable due to a sorting order difference. This impacts strings or binaries that have their first difference at a non-ascii character. These items may not be found in a set, or in an indexed column if the strings had a long common prefix (> 200 characters). (PR # 6670, since 2.0.0-rc7 for indexes, and since since the introduction of sets in v10.2.0)

Breaking changes

  • Support for upgrading from Realm files produced by RealmCore v5.23.9 or earlier is no longer supported.
  • Remove set_string_compare_method, only one sort method is now supported which was previously called STRING_COMPARE_CORE.
  • BinaryData and StringData are now strongly typed for comparisons and queries. This change is especially relevant when querying for a string constant on a Mixed property, as now only strings will be returned. If searching for BinaryData is desired, then that type must be specified by the constant. In RQL the new way to specify a binary constant is to use mixed = bin('xyz') or mixed = binary('xyz'). (6407).
  • In the C API, realm_collection_changes_get_num_changes and realm_dictionary_get_changes have got an extra parameter to receive information on the deletion of the entire collection.
  • Sorting order of strings has changed to use standard unicode codepoint order instead of grouping similar english letters together. A noticeable change will be from "aAbBzZ" to "ABZabz". (2573)

Compatibility

  • Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10. If you want to upgrade from an earlier file format version you will have to use RealmCore v13.x.y or earlier.

Internals

  • Refactoring of the StringIndex interface.

Realm Core v13.24.0

27 Nov 13:21
Compare
Choose a tag to compare

Enhancements

  • Refactored how KeyPathArrays are created in the C-API by adding realm_create_key_path_array which allows a SDK to pass in the string representation of the keypath and then let Core calculate the correct TableKey/ColKey pairs instead of doing this on the SDK side. (PR #7087)
  • KeyPathArrays can be constructed with a wildcard notation. (Issue #7125)

Fixed

  • Set::assign_intersection() on Set<StringData>, Set<BinaryData>, and Set<Mixed> containing string or binary would cause a use-after-free if a set was intersected with itself (PR #7144, since v10.0.0).
  • Set algebra on Set<StringData> and Set<BinaryData> gave incorrect results when used on platforms where char is signed (#7135, since v13.23.3).
  • Errors encountered while reapplying local changes for client reset recovery on partition-based sync Realms would result in the client reset attempt not being recorded, possibly resulting in an endless loop of attempting and failing to automatically recover the client reset. Flexible sync and errors from the server after completing the local recovery were handled correctly (PR #7149, since v10.2.0).
  • During a client reset with recovery when recovering a move or set operation on a LnkLst or Lst<Mixed> that operated on indices that were not also added in the recovery, links to an object which had been deleted by another client while offline would be recreated by the recovering client. But the objects of these links would only have the primary key populated and all other fields would be default values. Now, instead of creating these zombie objects, the lists being recovered skip such deleted links. (#7112 since the beginning of client reset with recovery in v11.16.0)
  • During a client reset recovery a Set of links could be missing items, or an exception could be thrown that prevents recovery ex: "Requested index 1 calling get() on set 'source.collection' when max is 0" (#7112, since the beginning of client reset with recovery in v11.16.0)
  • Calling sort() or distinct() on a LnkSet that had unresolved links in it would produce duplicate indices.
  • Some fields in realm_error_t were uninitialized and contained invalid values when being converted from sync errors - now they should properly be nullptr (PR #7154, since v13.18.0)
  • Automatic client reset recovery would duplicate insertions in a list when recovering a write which made an unrecoverable change to a list (i.e. modifying or deleting a pre-existing entry), followed by a subscription change, followed by a write which added an entry to the list (PR #7155, since v12.3.0).

Breaking changes

  • None.

Compatibility

  • Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.

Internals

  • None.

RealmCore v13.23.4

14 Nov 15:49
Compare
Choose a tag to compare

Enhancements

  • None.

Fixed

  • A crash at a very specific time during a DiscardLocal client reset on a FLX Realm could leave subscriptions in an invalid state (#7110, since v12.3.0).
  • Fixed an error "Invalid schema change (UPLOAD): cannot process AddColumn instruction for non-existent table" when using automatic client reset with recovery in dev mode to recover schema changes made locally while offline. (#7042 since the server introduced the feature that allows client to redefine the server's schema if the server is in dev mode - fall 2023)
  • Fix missing symbol linker error for Set<ObjKey> when building with Clang and LTO enabled (#7121, since v12.23.3).

Breaking changes

  • None.

Compatibility

  • Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.

Internals

  • Add baas-network-tests nightly task for testing sync client operation with non-ideal network conditions. (PR #6852)
  • Added non-ideal network conditions and network fault tests to the evergreen nightly test runs. (PR #7063)
  • Updated baas tests to run with dev mode disabled by default. (PR #6852)

Realm Core v13.23.3

03 Nov 14:14
Compare
Choose a tag to compare

Enhancements

  • Cancel asynchronous notifications on subscription state change in case of fatal session errors and when the session becomes inactive. (PR #7073)

Fixed

  • A new design around using a scheduler in C API has enabled the proper release of the user data (See "Breaking Changes") (#7094, since v10.4.0)
  • Potential stack-use-after-scope issue on changesets integration with msvc-2019 and mpack code (PR #6911)
  • Fix compilation with non-beta Xcode 15. Building for visionOS now requires explicitly specifying -DCMAKE_XCODE_ATTRIBUTE_SDKROOT=xros (PR #7055).
  • Fixed FLX subscriptions not being sent to the server if the session was interrupted during bootstrapping. (#7077, since v11.8.0)
  • Fixed FLX subscriptions not being sent to the server if an upload message was sent immediately after a subscription was committed but before the sync client checks for new subscriptions via SubscriptionStore::get_next_pending_version(). (#7076, since v13.23.1)
  • Fixed application crash with 'KeyNotFound' exception when subscriptions are marked complete after a client reset. (#7090, since v12.3.0)

Breaking changes

  • In the C API, the callback function realm_scheduler_notify_func_t now has a second parameter pointing to a work_queue. This pointer has to be kept until the notifications can be run on the proper thread. Then it has to be passed on to realm_scheduler_perform_work. The value returned from realm_scheduler_new (and friends) should be released after it has been used in realm_config_set_scheduler.

Compatibility

  • Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.

Internals

  • REALM_[ATMU]SAN cmake flags no longer override compilation options and can be combined with Debug|RelWithDebInfo|etc. build types. Rel[ATMU]SAN build type shortcuts are now all slightly optimized debug-based builds with sanitizers. REALM_ASAN now works with msvc (2019/2022) builds. (PR #6911)
  • Add support for building against the musl library. (PR #7067)
  • Remove ArrayWithFind's ability to use a templated callback parameter. The QueryStateBase consumers now use an index and the array leaf to get the actual value if needed. This allows certain queries such as count() to not do as many lookups to the actual values and results in a small performance gain. Also remove find_action_pattern() which was unused for a long time. This reduction in templating throughout the query system produces a small (~100k) binary size reduction. (#7095)
  • Rework the implemenatation of the set algrebra functions on Set to reduce the compiled size.
  • Rework the internal interface for sync Transformers to simplify it and reduce the compiled size (PR #7098).

Realm Core v13.23.2

27 Oct 10:41
Compare
Choose a tag to compare

13.23.2 Release notes

Enhancements

  • None.

Fixed

  • Deleting an object in an asymmetric table would cause a crash. Likely to solve #1537, since v12.1.0.
  • Implement BIO_CTRL_GET_KTLS_SEND and BIO_CTRL_GET_KTLS_RECV as OpenSSL versions < 3.0.4 depend on it.

Breaking changes

  • Added separate enum for callback handler result values in the platform networking C API. (PR #7015)
  • Platform networking CAPI now uses different callback types depending on where callback is used. (PR #7015)

Compatibility

  • Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.

Internals

  • Update JSON library from 3.7.3 to 3.11.2.
  • Updated async_write_binary in the Default Socket Provider to properly return a status to the callback handler. (PR #7015)

Realm Core v13.23.1

13 Oct 16:19
Compare
Choose a tag to compare

Enhancements

  • Empty commits no longer trigger an extra invocation of the sync progress handler reporting the exact same information as the previous invocation (PR #7031).

Fixed

  • SyncManager::path_for_realm() would return /<path>/filename.realm.realm if custom_file_name was set to filename.realm and the file didn't exist. It would correctly return /<path>/filename.realm if the file already existed. After this fix /<path>/filename.realm is returned in all cases. (#7038)
  • Fixed a bug preventing SSL handshake from completing successfuly due to failed hostname verification when linking against BoringSSL. (PR #7034)
  • Updating subscriptions did not trigger Realm autorefreshes, sometimes resulting in async refresh hanging until another write was performed by something else (PR #7031).

Breaking changes

  • None.

Compatibility

  • Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.

Internals

  • None.

Realm Core v13.23.0

06 Oct 16:10
Compare
Choose a tag to compare

Enhancements

  • Allow non-embedded links in asymmetric objects. (PR #6981)

Fixed

  • <How do the end-user experience this issue? what was the impact?> (#????, since v?.?.?)
  • Logging into a single user using multiple auth providers created a separate SyncUser per auth provider. This mostly worked, but had some quirks:
    • Sync sessions would not necessarily be associated with the specific SyncUser used to create them. As a result, querying a user for its sessions could give incorrect results, and logging one user out could close the wrong sessions.
    • Existing local synchronized Realm files created using version of Realm from August - November 2020 would sometimes not be opened correctly and would instead be redownloaded.
    • Removing one of the SyncUsers would delete all local Realm files for all SyncUsers for that user.
    • Deleting the server-side user via one of the SyncUsers left the other SyncUsers in an invalid state.
    • A SyncUser which was originally created via anonymous login and then linked to an identity would still be treated as an anonymous users and removed entirely on logout.
      (PR #6837, since v10.0.0)
  • Reading existing logged-in users on app startup from the sync metadata Realm performed three no-op writes per user on the metadata Realm (PR #6837, since v10.0.0).
  • If a user was logged out while an access token refresh was in progress, the refresh completing would mark the user as logged in again and the user would be in an inconsistent state (PR #6837, since v10.0.0).

Breaking changes

  • SyncUser::provider_type() and realm_user_get_auth_provider() have been removed. Users don't have provider types; identities do. SyncUser::is_anonymous() is a more correct version of checking if the provider type is anonymous (PR #6837).
  • SyncUser no longer has a local_identity(). identity() has been guaranteed to be unique per App ever since v10 (PR #6837).
  • SyncUser no longer overrides operator==. Pointer equality should be used to compare sync users (PR #6837).

Compatibility

  • Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.
  • The metadata Realm used to store sync users has had its schema version bumped. It is automatically migrated to the new version on first open. Downgrading to older version of Realm after upgrading will discard stored user tokens and require logging back in.

Realm Core v13.22.0

29 Sep 16:23
Compare
Choose a tag to compare

Enhancements

  • None.

Fixed

  • Fixed issue with double delete when using the CAPI for timers in platform networking (#6993, since v13.3.0).
  • Receiving a write_not_allowed error from the server would have led to a crash. (#6978, since v13.2.0)

Breaking changes

  • Platform Networking CAPI has been updated to provide separate functions (instead of 1) for executing callback handlers depending on purpose (PR #6994).

Compatibility

  • Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.

Internals

  • None.

Realm Core v13.21.0

25 Sep 13:34
Compare
Choose a tag to compare

Enhancements

  • Allow non-embedded links in asymmetric objects. (PR #6981)

Fixed

  • Logging into a single user using multiple auth providers created a separate SyncUser per auth provider. This mostly worked, but had some quirks:
    • Sync sessions would not necessarily be associated with the specific SyncUser used to create them. As a result, querying a user for its sessions could give incorrect results, and logging one user out could close the wrong sessions.
    • Existing local synchronized Realm files created using version of Realm from August - November 2020 would sometimes not be opened correctly and would instead be redownloaded.
    • Removing one of the SyncUsers would delete all local Realm files for all SyncUsers for that user.
    • Deleting the server-side user via one of the SyncUsers left the other SyncUsers in an invalid state.
    • A SyncUser which was originally created via anonymous login and then linked to an identity would still be treated as an anonymous users and removed entirely on logout.
      (PR #6837, since v10.0.0)
  • Reading existing logged-in users on app startup from the sync metadata Realm performed three no-op writes per user on the metadata Realm (PR #6837, since v10.0.0).
  • If a user was logged out while an access token refresh was in progress, the refresh completing would mark the user as logged in again and the user would be in an inconsistent state (PR #6837, since v10.0.0).
  • If querying over a geospatial dataset that had some objects with a type property set to something other than 'Point' (case insensitive) an exception would have been thrown. Instead of disrupting the query, those objects are now just ignored. (PR 6989, since the introduction of geospatial)
  • The Swift package failed to link required libraries when building for macCatalyst.

Breaking changes

  • SyncUser::provider_type() and realm_user_get_auth_provider() have been removed. Users don't have provider types; identities do. SyncUser::is_anonymous() is a more correct version of checking if the provider type is anonymous (PR #6837).
  • SyncUser no longer has a local_identity(). identity() has been guaranteed to be unique per App ever since v10 (PR #6837).
  • SyncUser no longer overrides operator==. Pointer equality should be used to compare sync users (PR #6837).

Compatibility

  • Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.
  • The metadata Realm used to store sync users has had its schema version bumped. It is automatically migrated to the new version on first open. Downgrading to older version of Realm after upgrading will discard stored user tokens and require logging back in.

Internals

  • Update History Command tool to work with realms with fileformat v23 (PR #6970)
  • Don't edit the ObjectStore target to enable the libuv scheduler in tests, just register the factory instead. (PR #6699)
  • Removed the core metrics which were unused. (PR 6990)

Realm Core v13.20.1

13 Sep 14:50
Compare
Choose a tag to compare

Enhancements

  • Throw an exception if File::unlock has failed, in order to inform the SDK that we are likely hitting some limitation on the OS filesystem, instead of crashing the application and use the same file locking logic for all the platforms.(PR #6926)

Fixed

  • Fixed crash in slab allocator (Assertion failed: ref + size <= next->first) Many issues like (#6340, since 13.0.0)
  • realm/sync/network/websocket_error.hpp was missing from the install package (PR #6954, since v13.18.0).
  • DB::get_number_of_versions() will now report the number of versions alive in the realm file. Before it reported the number of versions committed since the oldest live version. Metrics get_num_available_versions() is changed accordingly.
  • When using OpenSSL (i.e. on non-Apple platforms) the TlsHandshakeFailed error code would never be reported and instead TLS errors would be reported as SyncConnectFailed (PR #6938).
  • When using SecureTransport (i.e. on Apple platforms) only some TLS errors were reported as TlsHandshakeFailed and most were reported as SyncConnectFailed (PR #6938).
  • Sync errors originating from OpenSSL used the error message from the wrong end of the error stack, often resulting in very unhelpful error message (PR #6938).
  • Sending empty UPLOAD messages may lead to 'Bad server version' errors and client reset. (6966, since v11.8.0)

Breaking changes

  • None.

Compatibility

  • Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.

Internals

  • Add a CI job to validate that the headers in the installation package all build (PR #6954).
  • Fix build of most internal tools, also build them by default. (PR #6475)