Skip to content

Commit

Permalink
Upgrade to Realm Core v14.12.0 (#1822)
Browse files Browse the repository at this point in the history
  • Loading branch information
kneth authored Aug 22, 2024
1 parent 384549e commit 5db2a00
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@
### Enhancements
* Reduce the size of the local transaction log produced by creating objects, improving the performance of insertion-heavy transactions (Core issue [realm/realm-core#7734](https://github.com/realm/realm-core/pull/7734)).
* Performance has been improved for range queries on integers and timestamps. Requires that you use the "BETWEEN" operation in RQL or the Query::between() method when you build the query. (Core issue [realm/realm-core#7785](https://github.com/realm/realm-core/pull/7785))
* Updated bundled OpenSSL version to 3.3.1 (Core issue [realm/realm-core#7947](https://github.com/realm/realm-core/pull/7947)).
* [Sync] Add support for switching users with `App.switchUser(User)`. (Issue [#1813](https://github.com/realm/realm-kotlin/issues/1813)/[RKOTLIN-1115](https://jira.mongodb.org/browse/RKOTLIN-1115)).
* [Sync] Report the originating error that caused a client reset to occur. (Core issue [realm/realm-core#6154](https://github.com/realm/realm-core/issues/6154)).
* [Sync] 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 (Core issue [realm/realm-core#7791](https://github.com/realm/realm-core/pull/7791)).
* [Sync] On Windows devices Device Sync will additionally look up SSL certificates in the Windows Trusted Root Certification Authorities certificate store when establishing a connection. (Core issue [realm/realm-core#7882](https://github.com/realm/realm-core/pull/7882))
* [Sync] Role and permissions changes no longer require a client reset to update the local realm. (Core issue [realm/realm-core#7440](https://github.com/realm/realm-core/pull/7440)).
* [Sync] Sync log statements now include the app services connection id in their prefix (e.g `Connection[1:<connection id>] Session[1]: log message`) to make correlating sync activity to server logs easier during troubleshooting (Core issue [realm/realm-core#7849)](https://github.com/realm/realm-core/pull/7849)).
* [Sync] Improve sync bootstrap performance by reducing the number of table selections in the replication logs for embedded objects (Core issue [realm/realm-core#7945](https://github.com/realm/realm-core/issues/7945)).
* [Sync] Released a read lock which was pinned for the duration of a mutable subscription even after commit. This frees resources earlier, and may improve performance of sync bootstraps where the starting state is large (Core issue [realm/realm-core#7946](https://github.com/realm/realm-core/issues/7946)).
* [Sync] Client reset cycle detection now checks if the previous recovery attempt was made by the same core version, and if not attempts recovery again (Core issue [realm/realm-core#7944](https://github.com/realm/realm-core/pull/7944)).

### Fixed
* Comparing a numeric property with an argument list containing a string would throw. (Core issue [realm/realm-core#7714](https://github.com/realm/realm-core/issues/7714), since v2.0.0).
Expand All @@ -25,13 +29,17 @@
* You could get unexpected merge results when assigning to a nested collection (Core issue [realm/realm-core#7809](https://github.com/realm/realm-core/issues/7809), since v1.15.0)
* Fixed removing backlinks from the wrong objects if the link came from a nested list, nested dictionary, top-level dictionary, or list of mixed, and the source table had more than 256 objects. This could manifest as `array_backlink.cpp:112: Assertion failed: int64_t(value >> 1) == key.value` when removing an object. (Core issue [realm/realm-core#7594](https://github.com/realm/realm-core/issues/7594), since Core v11 for dictionaries)
* Fixed the collapse/rejoin of clusters which contained nested collections with links. This could manifest as `array.cpp:319: Array::move() Assertion failed: begin <= end [2, 1]` when removing an object. (Core issue [realm/realm-core#7839](https://github.com/realm/realm-core/issues/7839), since the introduction of nested collections in v1.15.0)
* Fixed an "invalid column key" exception when using a RQL "BETWEEN" query on an int or timestamp property across links (Core issue [realm/realm-core#7935](https://github.com/realm/realm-core/issues/7935), since v2.0.0)
* [Sync] Platform networking was not enabled even if setting `AppConfiguration.Builder.usePlatformNetworking`. (Issue [#1811](https://github.com/realm/realm-kotlin/issues/1811)/[RKOTLIN-1114](https://jira.mongodb.org/browse/RKOTLIN-1114)).
* [Sync] 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. (Core issue [realm/realm-core#7542](https://github.com/realm/realm-core/pull/7542), since v1.9.0)
* [Sync] Fixed a change of mode from Strong to All when removing links from an embedded object that links to a tombstone. This affects sync apps that use embedded objects which have a `Lst<Mixed>` that contains a link to another top level object which has been deleted by another sync client (creating a tombstone locally). In this particular case, the switch would cause any remaining link removals to recursively delete the destination object if there were no other links to it. (Core issue [realm/realm-core#7828](https://github.com/realm/realm-core/issues/7828), since v1.15.0)
* [Sync] `SyncSession.uploadAllLocalChanges` was inconsistent in how it handled commits which did not produce any changesets to upload. Previously it would sometimes complete immediately if all commits waiting to be uploaded were empty, and at other times it would wait for a server roundtrip. It will now always complete immediately. (Core issue [realm/realm-core#7796](https://github.com/realm/realm-core/pull/7796)).
* [Sync] Sync client can crash if a session is resumed while the session is being suspended. (Core issue [realm/realm-core#7860](https://github.com/realm/realm-core/issues/7860), since v1.0.0)
* [Sync] When a sync session is interrupted by a disconnect or restart while downloading a bootstrap, stale data from the previous bootstrap may be included when the session reconnects and downloads the bootstrap. This can lead to objects stored in the database that do not match the actual state of the server and potentially leading to compensating writes. (Core issue [realm/realm-core#7827](https://github.com/realm/realm-core/issues/7827), since v1.0.0).
* [Sync] App subscription callback was getting fired before the user profile was retrieved on login, leading to an empty user profile when using the callback. ([#7889](https://github.com/realm/realm-core/issues/7889), since v14.7.0).
* [Sync] App subscription callback was getting fired before the user profile was retrieved on login, leading to an empty user profile when using the callback. (Core issue [realm/realm-core#7889](https://github.com/realm/realm-core/issues/7889), since v2.0.0).
* [Sync] Fixed conflict resolution bug related to ArrayErase and Clear instructions, which could sometimes cause an "Invalid prior_size" exception to prevent synchronization (Core issue [realm/realm-core#7893](https://github.com/realm/realm-core/issues/7893), since v2.0.0).
* [Sync] Fixed bug which would prevent eventual consistency during conflict resolution. Affected clients would experience data divergence and potentially consistency errors as a result (Core issue [realm/realm-core#7955](https://github.com/realm/realm-core/pull/7955), since v2.0.0).
* [Sync] Fixed issues loading the native Realm libraries on Linux ARMv7 systems when they linked against our bundled OpenSSL resulting in errors like `unexpected reloc type 0x03` (Core issue [realm/realm-core#7947](https://github.com/realm/realm-core/issues/7947), since Realm Core v14.1.0).

### Compatibility
* File format: Generates Realms with file format v24 (reads and upgrades file format v10 or later).
Expand All @@ -49,7 +57,7 @@
* Minimum R8: 8.0.34.

### Internal
* Updated to Realm Core 14.11.2 commit 117c1cbf2b96eaa1bf51562e4f45d3649b3bdad2.
* Updated to Realm Core 14.12.0 commit c2552e1d36867cb42b28130e894a81fc17081062.
* Updated to Sync protocol version 14 to support server intiated bootstraps and role change updates without a client reset. (Core issue [realm/realm-core#7440](https://github.com/realm/realm-core/pull/7440)).


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import kotlinx.coroutines.delay
import org.mongodb.kbson.ObjectId
import kotlin.test.AfterTest
import kotlin.test.BeforeTest
import kotlin.test.Ignore
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
Expand Down Expand Up @@ -241,6 +242,8 @@ class AsymmetricSyncTests {

// Verify that a schema of Asymmetric -> Embedded -> RealmObject work.
@Test
@Ignore
// See https://github.com/realm/realm-kotlin/issues/1823
fun asymmetricSchema() = runBlocking {
config = SyncConfiguration.Builder(
app.login(Credentials.anonymous()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import kotlinx.coroutines.TimeoutCancellationException
import kotlin.random.Random
import kotlin.test.AfterTest
import kotlin.test.BeforeTest
import kotlin.test.Ignore
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
Expand Down Expand Up @@ -196,6 +197,8 @@ class SubscriptionExtensionsTests {
}

@Test
@Ignore
// See https://github.com/realm/realm-kotlin/issues/1823
fun realmQuery_subscribe_waitNever() = runBlocking {
// Un-named
realm.query<FlexParentObject>().subscribe(mode = WaitForSync.NEVER)
Expand Down Expand Up @@ -260,6 +263,8 @@ class SubscriptionExtensionsTests {
}

@Test
@Ignore
// See https://github.com/realm/realm-kotlin/issues/1823
fun realmResults_subscribe_waitFirstTime() = runBlocking {
val section = Random.nextInt()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import kotlinx.coroutines.delay
import kotlinx.datetime.Clock
import kotlin.test.AfterTest
import kotlin.test.BeforeTest
import kotlin.test.Ignore
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
Expand Down Expand Up @@ -127,6 +128,8 @@ class SubscriptionTests {
}

@Test
@Ignore
// See https://github.com/realm/realm-kotlin/issues/1823
fun asQuery() = runBlocking {
val sub: Subscription = realm.subscriptions.update { realm ->
add(realm.query<ParentPk>("name = $0", "my-name"))
Expand Down

0 comments on commit 5db2a00

Please sign in to comment.