Realm Core Versions Save

Core database component for the Realm Mobile Database SDKs

v14.10.2

5 days ago

14.10.2 Release notes

Enhancements

  • None.

Fixed

  • DB::compact() on an encrypted Realm without explicitly specifying a new encryption key would only work if the old key happened to be a valid nul-terminated string (#7842, since v14.10.0).
  • You could get unexpected merge results when assigning to a nested collection (#7809, since v14.0.0)

Breaking changes

  • None.

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

  • FLX download estimates are now tracked in a multiprocess-compatible manner (PR #7780).
  • Fixed util::FlatMap so it uses the custom Compare for both ordering and equality checking so you can use util::FlatMap with case-insensitive string keys (PR #7845).

v14.10.1

2 weeks ago

14.10.1 Release notes

Enhancements

  • It is no longer an error to set a base url for an App with a trailing slash - for example, https://services.cloud.mongodb.com/ instead of https://services.cloud.mongodb.com - before this change that would result in a 404 error from the server (PR #7791).
  • Performance has been improved for range queries on integers and timestamps. Requires that you use the "BETWEEN" operation in MQL or the Query::between() method when you build the query. (PR #7785)
  • Expose Obj::add_int() in the bindgen spec. (PR #7797).

Fixed

  • Valgrind could report a branch on an uninitialized read when opening something that is not an encrypted Realm file as an encrypted Realm file (PR #7789, since v14.10.0).
  • Opening an FLX realm asynchronously may not wait to download all data (#7720, since FLX sync was introduced).
  • Clearing a List of Mixed in an upgraded file would lead to an assertion failing (#7771, since 14.0.0)
  • Fix compilation with Xcode 16 (PR #7802)

Breaking changes

  • None.

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

  • Switch to building the Swift package and Cocoa binaries as C++20 (PR #7802).

v14.10.0

3 weeks ago

Enhancements

  • Include the originating client reset error in AutoClientResetFailure errors. (#7761)
  • Reduce the size of the local transaction log produced by creating objects, improving the performance of insertion-heavy transactions (PR #7734).

Fixed

  • Fix some client resets (such as migrating to flexible sync) potentially failing with AutoClientResetFailed if a new client reset condition (such as rolling back a flexible sync migration) occurred before the first one completed. (PR #7542, since v13.11.0)
  • Encrypted files on Windows had a maximum size of 2GB even on x64 due to internal usage of off_t, which is a 32-bit type on 64-bit Windows (PR #7698, since the introduction of encryption support on Windows in v3.0.0).
  • The encryption code no longer behaves differently depending on the system page size, which should entirely eliminate a recurring source of bugs related to copying encrypted Realm files between platforms with different page sizes. One known outstanding bug was (RNET-1141), where opening files on a system with a larger page size than the writing system would attempt to read sections of the file which had never been written to (PR #7698).
  • There were several complicated scenarios which could result in stale reads from encrypted files in multiprocess scenarios. These were very difficult to hit and would typically lead to a crash, either due to an assertion failure or DecryptionFailure being thrown (PR #7698, since v13.9.0).
  • Encrypted files have some benign data races where we can memcpy a block of memory while another thread is writing to a limited range of it. It is logically impossible to ever read from that range when this happens, but Thread Sanitizer quite reasonably complains about this. We now perform a slower operations when running with TSan which avoids this benign race (PR #7698).
  • Tokenizing strings for full-text search could pass values outside the range [-1, 255] to isspace(), which is undefined behavior (PR #7698, since the introduction of FTS in v13.0.0).

Breaking changes

  • Any stitch_ prefixed fields in the BsonDocument returned from app::User::custom_data() are being renamed on the server to have a baas_ prefix instead (PR #7769).

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

  • Removed references to stitch_ fields in access tokens in sync unit tests (PR #7769).
  • Added back iOS simulator testing to evergreen after Jenkins went away (PR #7758).
  • realm-trawler -c did not work on Realm using SyncClient history (PR #7734).
  • File::Map's move constructor and assignment operator left m_fd unchanged, which appears to have never actually resulted in problems with how it was used (PR #7698).

v14.9.0

1 month ago

14.9.0 Release notes

Enhancements

  • Report the originating error that caused a client reset to occur. (#6154)

Fixed

  • Add a missing file from the bid library to the android blueprint. (PR #7738)
  • After compacting, a file upgrade would be triggered. This could cause loss of data if schema mode is SoftResetFile (#7747, since 14.0.0)
  • Add missing REALM_APP_SERVICES flag to the android blueprint. (PR #7755)

Breaking changes

  • None.

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

  • Work around a bug in VC++ that resulted in runtime errors when running the tests in a debug build (#7741).
  • Refactor sync::Session to eliminate the bind() step of session creation (#7609).
  • Add ScopeExitFail which only calls the handler if exiting the scope via an uncaught exception (#7609).
  • Add the originating error and server requests action that caused a client reset to occur to the client reset tracking metadata storage. (PR #7649)

14.8.0

1 month ago

14.8.0 Release notes

Enhancements

  • Add vendor support to the Android Blueprint (PR #7614).

Fixed

  • A non-streaming progress notifier would not immediately call its callback after registration. Instead you would have to wait for a download message to be received to get your first update - if you were already caught up when you registered the notifier you could end up waiting a long time for the server to deliver a download that would call/expire your notifier (#7627, since v14.6.0).
  • Comparing a numeric property with an argument list containing a string would throw. (#7714, since v14.7.0)

Breaking changes

  • None.

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

  • util::Thread no longer has any functionality other than get_name() and set_name(). Use std::thread instead (PR #7696).

v14.7.0

1 month ago

Enhancements

  • Nested collections have full support for automatic client reset (PR #7683).

Fixed

  • Having links in a nested collections would leave the file inconsistent if the top object is removed. (#7657, since 14.0.0)
  • Accessing App::current_user() from within a notification produced by App:switch_user() (which includes notifications for a newly logged in user) would deadlock (#7670, since v14.6.0).
  • Inserting the same typed link to the same key in a dictionary more than once would incorrectly create multiple backlinks to the object. This did not appear to cause any crashes later, but would have affecting explicit backlink count queries (eg: ...@links.@count) and possibly notifications (#7676 since v14.5.2).
  • Automatic client reset recovery would crash when recovering AddInteger instructions on a Mixed property if its type was changed to non-integer (PR #7683, since v11.16.0).

Breaking changes

  • None.

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

  • (bindgen) Exposing a function app_user_as_sync_user to cast the opposite way as sync_user_as_app_user. (PR #7684 as a follow-up to PR #7634)
  • Protocol version bumped to 13.

v14.6.2

2 months ago

Enhancements

  • None.

Fixed

  • Fixed a bug when running a IN query on a String/Int/UUID/ObjectId property that was indexed. (7642 since v14.6.0)
  • Fixed a bug when running a IN query on a integer property where double/float parameters were ignored. (7642 since v14.6.0)

Breaking changes

  • None.

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.

v14.6.1

2 months ago

Enhancements

  • None.

Fixed

  • Fix assertion failure or wrong results when evaluating a RQL query with multiple IN conditions on the same property. Applies to non-indexed int/string/ObjectId/UUID properties, or if they were indexed and had > 100 conditions. ((RCORE-2098) PR #7628 since v14.6.0).
  • Fixed a bug when running a IN query (or a query of the pattern x == 1 OR x == 2 OR x == 3) when evaluating on a string property with an empty string in the search condition. Matches with an empty string would have been evaluated as if searching for a null string instead. (PR #7628 since v10.0.0-beta.9)
  • Fixed a bug when running a IN query on a String/Int/UUID/ObjectId property that was indexed. (7642 since v14.6.0)
  • Fixed a bug when running a IN query on a integer property where double/float parameters were ignored. (7642 since v14.6.0)

Breaking changes

  • None.

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

  • Follow on to (PR #7300) to allow SDKs to construct a fake user for testing SyncManager::get_user -> App::create_fake_user_for_testing (PR #7632)
  • Fix build-apple-device.sh, broken in #7603 (PR #7640).
  • Added a CAPI interface for SDKs to bring their own managed users with core's app services turned off. (PR #7615).
  • Bump the minimum deployment targets on Apple platforms to the minimums supported by Xcode 15 and clean up now unused availability checks. (PR #7648).
  • Build with -Werror on CI to ensure that new warnings don't slip in. (PR #7646)

v14.6.0

2 months ago

Enhancements

  • Add SyncClientConfig::security_access_group which allows specifying the access group to use for the sync metadata Realm's encryption key. Setting this is required when sharing the metadata Realm between apps on Apple platforms (PR #7552).
  • When connecting to multiple server apps, a unique encryption key is used for each of the metadata Realms rather than sharing one between them (#7552).
  • Introduce the new SyncUser interface which can be implemented by SDKs to use sync without the core App Services implementation (or just for greater control over user behavior in tests). (PR #7300).
  • Improve perfomance of "chained OR equality" queries for UUID/ObjectId types and RQL parsed "IN" queries on string/int/uuid/objectid types. (.Net #3566, since the introduction of these types)
  • Introducing Query::in() which allows SDKs to take advantage of improved performance when building equality conditions against many constants. (PR #7582)

Fixed

  • SyncUser::all_sessions() included sessions in every state except for waiting for access token, which was weirdly inconsistent. It now includes all sessions. (PR #7300).
  • App::all_users() included logged out users only if they were logged out while the App instance existed. It now always includes all logged out users. (PR #7300).
  • Deleting the active user left the active user unset rather than selecting another logged-in user as the active user like logging out and removing users did. (PR #7300).
  • Fixed several issues around encrypted file portability (copying a "bundled" encrypted Realm from one device to another):
    • Fixed Assertion failed: new_size % (1ULL << m_page_shift) == 0 when opening an encrypted Realm less than 64Mb that was generated on a platform with a different page size than the current platform. (#7322, since v13.17.1)
    • Fixed a DecryptionFailed exception thrown when opening a small (<4k of data) Realm generated on a device with a page size of 4k if it was bundled and opened on a device with a larger page size (since the beginning).
    • Fixed an issue during a subsequent open of an encrypted Realm for some rare allocation patterns when the top ref was within ~50 bytes of the end of a page. This could manifest as a DecryptionFailed exception or as an assertion: encrypted_file_mapping.hpp:183: Assertion failed: local_ndx < m_page_state.size(). (#7319)
  • Non-streaming download sync progress notification is fixed for flexible sync Realms where before it was sometimes stopping to emit values right after the registration of the callback (#7561).
  • Schema initialization could hit an assertion failure if the sync client applied a downloaded changeset while the Realm file was in the process of being opened (#7041, since v11.4.0).
  • Queries using query paths on Mixed values returns inconsistent results (#7587, since v14.0.0)
  • Enabling 'cancel_waits_on_nonfatal_error' does not cancel waits during location update while offline (#7527, since v13.26.0)

Breaking changes

  • The following things have been renamed or moved as part of moving all of the App Services functionality to the app namespace:
    • SyncUser -> app::User. Note that there is a new, different type named SyncUser.
    • SyncUser::identity -> app::User::user_id. The "identity" word was overloaded to mean two unrelated things, and one has been changed to user_id everywhere.
    • SyncUserSubscriptionToken -> app::UserSubscriptionToken
    • SyncUserProfile -> app::UserProfile
    • App::Config -> AppConfig
    • SyncConfig::MetadataMode -> AppConfig::MetadataMode
    • MetadataMode::NoMetadata -> MetadataMode::InMemory
    • SyncUser::session_for_on_disk_path() -> SyncManager::get_existing_session()
    • SyncUser::all_sessions() -> SyncManager::get_all_sessions_for(User&)
    • SyncManager::immediately_run_file_actions() -> App::immediately_run_file_actions()
    • realm_sync_user_subscription_token -> realm_app_user_subscription_token (PR #7300).
  • The ClientAppDeallocated error code no longer exists as this error code can no longer occur. (PR #7300).
  • Some fields have moved from SyncClientConfig to AppConfig. AppConfig now has a SyncClientConfig field rather than it being passed separately to App::get_app(). (PR #7300).
  • Sync user management has been removed from SyncManager. This functionality was already additionally available on App. (PR #7300).
  • AuditConfig now has a base_file_path field which must be set by the SDK rather than inheriting it from the SyncManager. (PR #7300).
  • App::switch_user() no longer returns a user. The return value was always exactly the passed-in user and any code which needs it can just use that. (PR #7300).
  • Non-streaming download progress callback no longer stops reporting values immediately after the registration (if the progress update has happened earlier), but waits for the next batch of data to start syncing to report its progress, since the previous behaviour was not useful (PR #7561).

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

  • App metadata storage has been entirely rewritten in preparation for supporting sharing metadata realms between processes. (PR #7300).
  • The metadata disabled mode has been replaced with an in-memory metadata mode which performs similarly and doesn't work weirdly differently from the normal mode. The new mode is intended for testing purposes, but should be suitable for production usage if there is a scenario where metadata persistence is not needed. (PR #7300).
  • The ownership relationship between App and User has changed. User now strongly retains App and App has a weak cache of Users. This means that creating a SyncConfig or opening a Realm will keep the parent App alive, rather than things being in a broken state if the App is deallocated. (PR #7300.
  • A new CMake define REALM_APP_SERVICES can be used to compile out core's default implmentation of the application services. (#7268)
  • Fix a race condition in Promise which could result in an assertion failure if it was destroyed immediately after a get() on the Future returned. The problematic scenario only occurred in test code and not in library code (PR #7602).
  • Catch2 is no longer required as a submodule if the REALM_NO_TESTS flag is set.
  • Sha-2 is no longer required as a submodule on Windows if linking with OpenSSL.
  • The Catch2 submodule has moved to test/external/catch.
  • Fix possible file corruption if using Transaction::copy_to if nested collections are present.
  • Evergreen config was udpated so most linux CI testing is done on ubuntu 22.04 on aarch64 with clang 18, upgrading from clang 11 on ubuntu 20.04 mostly on x86_64 (PR #7475).
  • Evergreen config was updated to move most MacOS testing to MacOS 14 on arm64 with Xcode 15.2, updating from Macos 11 on x86_64 with Xcode 13.1 (PR #7618).

v14.5.2

2 months ago

Fixed

  • Fix compilation errors when using command-line swift build (#7587, since v14.5.1).
  • Fixed crash when integrating removal of already removed dictionary key (#7488, since v10.0.0).

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

  • prior_size field in Clear instruction is being repurposed as collection_type (no protocol changes required)