Skip to content

Commit

Permalink
Upgrade realm-core to v13.26.0 (#1482)
Browse files Browse the repository at this point in the history
* Upgrade realm-core to v13.26.0

* Update CHANGELOG
  • Loading branch information
nielsenko authored Jan 22, 2024
1 parent 7a69fb2 commit 29e35da
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@
(PR [#7161](https://github.com/realm/realm-core/pull/7161), Core 13.24.1).
* If the very first open of a flexible sync Realm triggered a client reset, the configuration had an initial subscriptions callback, both before and after reset callbacks, and the initial subscription callback began a read transaction without ending it (which is normally going to be the case), opening the frozen Realm for the after reset callback would trigger a BadVersion exception (PR [#7161](https://github.com/realm/realm-core/pull/7161), Core 13.24.1).
* Changesets have wrong timestamps if the local clock lags behind 2015-01-01T00:00:00Z. The sync client now throws an exception if that happens. (PR [#7180](https://github.com/realm/realm-core/pull/7180), Core 13.24.1)
* Handle `EOPNOTSUPP` when using `posix_fallocate()` and fallback to manually consume space. This should enable android users to open a Realm on restrictive filesystems. (PR [#7251](https://github.com/realm/realm-core/pull/7251), Core v13.26.0)
* Application may crash with `incoming_changesets.size() != 0` when a download message is mistaken for a bootstrap message. This can happen if the synchronization session is paused and resumed at a specific time. (PR [#7238](https://github.com/realm/realm-core/pull/7238), Core v13.26.0, since v11.8.0)

### Compatibility
* Realm Studio: 13.0.0 or later.

### Internal
* Using Core 13.25.1.
* Using Core v13.26.0.

## 1.6.1 (2023-11-30)

Expand Down
69 changes: 69 additions & 0 deletions lib/src/native/realm_bindings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,30 @@ class RealmLibrary {
late final _realm_app_get_app_id = _realm_app_get_app_idPtr
.asFunction<ffi.Pointer<ffi.Char> Function(ffi.Pointer<realm_app_t>)>();

/// Return the current base URL value used by the app. If the realm_app_update_base_url() is called, this
/// value will match the base_url value provided to that function when the update is complete. The value
/// provided by this function is undefined if the realm_app_update_base_url() operation is in progress,
/// since it will likely be the base_url value prior to realm_app_update_base_url() being called.
///
/// @param app ptr to realm_app
/// @return The current base URL string used by the app
///
/// Return value must be manually released with realm_free().
ffi.Pointer<ffi.Char> realm_app_get_base_url(
ffi.Pointer<realm_app_t> app,
) {
return _realm_app_get_base_url(
app,
);
}

late final _realm_app_get_base_urlPtr = _lookup<
ffi.NativeFunction<
ffi.Pointer<ffi.Char> Function(
ffi.Pointer<realm_app_t>)>>('realm_app_get_base_url');
late final _realm_app_get_base_url = _realm_app_get_base_urlPtr
.asFunction<ffi.Pointer<ffi.Char> Function(ffi.Pointer<realm_app_t>)>();

/// Get a cached realm_app_t* instance given an app id. out_app may be null if the app with this id hasn't been
/// previously cached by calling realm_app_create_cached.
///
Expand Down Expand Up @@ -1482,6 +1506,50 @@ class RealmLibrary {
_realm_app_sync_client_wait_for_sessions_to_terminatePtr
.asFunction<void Function(ffi.Pointer<realm_app_t>)>();

/// Update the URL used to communicate with the Realm server. This function will update the location
/// information used for http and websocket requests to the server. Once this operation has completed,
/// the new base_url value returned by realm_app_get_base_url() will match the base_url value provided
/// to this function. Any App requests performed while the base URl update is currently in progress
/// will continue to use the original base URL value.
///
/// @param app ptr to realm_app
/// @param base_url The new base URL value to set as the Realm server URL - a null or empty string will
/// use the default base URL value
/// @param callback invoked once operation has completed
/// @return True if no error has been recorded, False otherwise
bool realm_app_update_base_url(
ffi.Pointer<realm_app_t> app,
ffi.Pointer<ffi.Char> base_url,
realm_app_void_completion_func_t callback,
ffi.Pointer<ffi.Void> userdata,
realm_free_userdata_func_t userdata_free,
) {
return _realm_app_update_base_url(
app,
base_url,
callback,
userdata,
userdata_free,
);
}

late final _realm_app_update_base_urlPtr = _lookup<
ffi.NativeFunction<
ffi.Bool Function(
ffi.Pointer<realm_app_t>,
ffi.Pointer<ffi.Char>,
realm_app_void_completion_func_t,
ffi.Pointer<ffi.Void>,
realm_free_userdata_func_t)>>('realm_app_update_base_url');
late final _realm_app_update_base_url =
_realm_app_update_base_urlPtr.asFunction<
bool Function(
ffi.Pointer<realm_app_t>,
ffi.Pointer<ffi.Char>,
realm_app_void_completion_func_t,
ffi.Pointer<ffi.Void>,
realm_free_userdata_func_t)>();

/// Creates a user API key that can be used to authenticate as the current user.
/// @return True if no error was recorded. False otherwise
bool realm_app_user_apikey_provider_client_create_apikey(
Expand Down Expand Up @@ -11692,6 +11760,7 @@ abstract class realm_errno {
static const int RLM_ERR_WRONG_SYNC_TYPE = 1043;
static const int RLM_ERR_SYNC_WRITE_NOT_ALLOWED = 1044;
static const int RLM_ERR_SYNC_LOCAL_CLOCK_BEFORE_EPOCH = 1045;
static const int RLM_ERR_SYNC_SCHEMA_MIGRATION_ERROR = 1046;
static const int RLM_ERR_SYSTEM_ERROR = 1999;
static const int RLM_ERR_LOGIC = 2000;
static const int RLM_ERR_NOT_SUPPORTED = 2001;
Expand Down
2 changes: 1 addition & 1 deletion src/realm-core
Submodule realm-core updated 79 files
+29 −0 CHANGELOG.md
+17 −33 Jenkinsfile
+2 −1 Package.swift
+9 −3 bindgen/spec.yml
+4 −2 dependencies.list
+17 −8 evergreen/config.yml
+48 −2 evergreen/install_baas.sh
+2 −0 evergreen/setup_baas_host_local.sh
+8 −14 how-to-build.md
+30 −0 src/realm.h
+4 −0 src/realm/CMakeLists.txt
+6 −16 src/realm/db.cpp
+2 −3 src/realm/db.hpp
+1 −0 src/realm/error_codes.cpp
+3 −0 src/realm/error_codes.h
+1 −0 src/realm/error_codes.hpp
+1 −0 src/realm/exceptions.cpp
+22 −0 src/realm/exceptions.hpp
+9 −5 src/realm/object-store/audit.mm
+22 −2 src/realm/object-store/c_api/app.cpp
+4 −3 src/realm/object-store/impl/realm_coordinator.cpp
+5 −2 src/realm/object-store/impl/realm_coordinator.hpp
+5 −4 src/realm/object-store/object_store.cpp
+2 −1 src/realm/object-store/object_store.hpp
+24 −8 src/realm/object-store/shared_realm.cpp
+7 −10 src/realm/object-store/shared_realm.hpp
+345 −244 src/realm/object-store/sync/app.cpp
+140 −71 src/realm/object-store/sync/app.hpp
+107 −8 src/realm/object-store/sync/app_utils.cpp
+19 −2 src/realm/object-store/sync/app_utils.hpp
+119 −19 src/realm/object-store/sync/async_open_task.cpp
+14 −4 src/realm/object-store/sync/async_open_task.hpp
+3 −1 src/realm/object-store/sync/generic_network_transport.cpp
+6 −0 src/realm/object-store/sync/impl/sync_client.hpp
+5 −4 src/realm/object-store/sync/sync_manager.cpp
+13 −3 src/realm/object-store/sync/sync_manager.hpp
+101 −14 src/realm/object-store/sync/sync_session.cpp
+22 −11 src/realm/object-store/sync/sync_session.hpp
+2 −2 src/realm/object-store/sync/sync_user.cpp
+6 −4 src/realm/object-store/sync/sync_user.hpp
+2 −0 src/realm/sync/CMakeLists.txt
+39 −4 src/realm/sync/client.cpp
+8 −18 src/realm/sync/client.hpp
+9 −0 src/realm/sync/network/http.cpp
+40 −3 src/realm/sync/network/http.hpp
+19 −4 src/realm/sync/noinst/client_impl_base.cpp
+5 −0 src/realm/sync/noinst/client_impl_base.hpp
+2 −10 src/realm/sync/noinst/migration_store.cpp
+3 −2 src/realm/sync/noinst/migration_store.hpp
+11 −0 src/realm/sync/noinst/protocol_codec.hpp
+109 −0 src/realm/sync/noinst/sync_schema_migration.cpp
+33 −0 src/realm/sync/noinst/sync_schema_migration.hpp
+9 −0 src/realm/sync/protocol.cpp
+16 −4 src/realm/sync/protocol.hpp
+2 −12 src/realm/sync/subscriptions.cpp
+3 −3 src/realm/sync/subscriptions.hpp
+1 −1 src/realm/util/file.cpp
+1 −0 test/object-store/CMakeLists.txt
+69 −9 test/object-store/c_api/c_api.cpp
+0 −6 test/object-store/realm.cpp
+953 −209 test/object-store/sync/app.cpp
+6 −0 test/object-store/sync/flx_migration.cpp
+990 −0 test/object-store/sync/flx_schema_migration.cpp
+40 −3 test/object-store/sync/flx_sync.cpp
+23 −0 test/object-store/sync/session/session.cpp
+95 −40 test/object-store/util/sync/baas_admin_api.cpp
+2 −0 test/object-store/util/sync/baas_admin_api.hpp
+9 −3 test/object-store/util/sync/flx_sync_harness.hpp
+11 −2 test/object-store/util/sync/sync_test_utils.cpp
+2 −0 test/object-store/util/sync/sync_test_utils.hpp
+5 −5 test/object-store/util/test_file.cpp
+1 −1 test/object-store/util/test_file.hpp
+13 −0 test/object-store/util/test_utils.hpp
+10 −4 test/object-store/util/unit_test_transport.cpp
+13 −0 test/object-store/util/unit_test_transport.hpp
+28 −13 test/test_lang_bind_helper.cpp
+135 −0 test/test_util_http.cpp
+10 −4 tools/cmake/GetVersion.cmake
+0 −5 tools/run_baas_docker_image.sh

0 comments on commit 29e35da

Please sign in to comment.