Skip to content

Commit

Permalink
Merge branch 'master' into kneth/cpp20-windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jedelbo committed Jul 2, 2024
2 parents 41870af + f66e24d commit 997f636
Show file tree
Hide file tree
Showing 51 changed files with 1,504 additions and 892 deletions.
31 changes: 29 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,39 @@

### Enhancements
* <New feature description> (PR [#????](https://github.com/realm/realm-core/pull/????))
* None.
* "Next launch" metadata file actions are now performed in a multi-process safe manner ([#7576](https://github.com/realm/realm-core/pull/7576)).

### Fixed
* <How do the end-user experience this issue? what was the impact?> ([#????](https://github.com/realm/realm-core/issues/????), since v?.?.?)
* 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. ([#7828](https://github.com/realm/realm-core/issues/7828), since 14.0.0-beta.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. ([#7594](https://github.com/realm/realm-core/issues/7594), since 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. ([#7839](https://github.com/realm/realm-core/issues/7839), since the introduction of nested collections in v14.0.0-beta.0)
* wait_for_upload_completion() 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. ([PR #7796](https://github.com/realm/realm-core/pull/7796)).

### 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
* Fixed `Table::remove_object_recursive` which wouldn't recursively follow links through a single `Mixed` property. This feature is exposed publicly on `Table` but no SDK currently uses it, so this is considered internal. ([#7829](https://github.com/realm/realm-core/issues/7829), likely since the introduction of Mixed)
* Upload completion is now tracked in a multiprocess-compatible manner ([PR #7796](https://github.com/realm/realm-core/pull/7796)).
* Building using C++20 on Windows is enabled.

----------------------------------------------

# 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](https://github.com/realm/realm-core/issues/7842), since v14.10.0).
* You could get unexpected merge results when assigning to a nested collection ([#7809](https://github.com/realm/realm-core/issues/7809), since v14.0.0)

### Breaking changes
* None.

Expand All @@ -18,7 +45,7 @@

### Internals
* FLX download estimates are now tracked in a multiprocess-compatible manner ([PR #7780](https://github.com/realm/realm-core/pull/7780)).
* Building using C++20 on Windows.
* 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](https://github.com/realm/realm-core/pull/7845)).

----------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import PackageDescription
import Foundation

let versionStr = "14.10.1"
let versionStr = "14.10.2"
let versionPieces = versionStr.split(separator: "-")
let versionCompontents = versionPieces[0].split(separator: ".")
let versionExtra = versionPieces.count > 1 ? versionPieces[1] : ""
Expand Down
2 changes: 1 addition & 1 deletion dependencies.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PACKAGE_NAME: realm-core
VERSION: 14.10.1
VERSION: 14.10.2
OPENSSL_VERSION: 3.2.0
ZLIB_VERSION: 1.2.13
# https://github.com/10gen/baas/commits
Expand Down
11 changes: 10 additions & 1 deletion evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,15 @@ buildvariants:
tasks:
- name: compile_local_tests

- name: ubuntu-2404-GCC
display_name: "Ubuntu 24.04 arm64 (native GCC)"
run_on: ubuntu2404-arm64-large
expansions:
fetch_missing_dependencies: On
disable_tests_against_baas: On
tasks:
- name: compile_local_tests

- name: ubuntu-encryption-tsan
display_name: "Ubuntu (Encryption Enabled w/TSAN)"
run_on: ubuntu2204-arm64-small
Expand Down Expand Up @@ -1488,7 +1497,7 @@ buildvariants:
- name: generate-sync-corpus

- name: ubuntu2004-arm64
display_name: "Ubuntu 20.04 ARM64 (Clang 11 release benchmarks)"
display_name: "Ubuntu 20.04 ARM64 (GCC 9 release benchmarks)"
run_on: ubuntu2004-arm64-large
expansions:
cmake_url: "https://s3.amazonaws.com/static.realm.io/evergreen-assets/cmake-3.26.3-linux-aarch64.tar.gz"
Expand Down
5 changes: 2 additions & 3 deletions src/external/s2/s2polygonbuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,8 @@ S2Loop* S2PolygonBuilder::AssembleLoop(S2Point const& v0, S2Point const& v1,
path.push_back(v1);
index[v1] = 1;
while (path.size() >= 2) {
// Note that "v0" and "v1" become invalid if "path" is modified.
S2Point const& v0 = path.end()[-2];
S2Point const& v1 = path.end()[-1];
S2Point const v0 = path.end()[-2];
S2Point const v1 = path.end()[-1];
S2Point v2;
bool v2_found = false;
EdgeSet::const_iterator candidates = edges_->find(v1);
Expand Down
3 changes: 2 additions & 1 deletion src/realm/array_mixed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ void ArrayMixed::move(ArrayMixed& dst, size_t ndx)
{
auto sz = size();
size_t i = ndx;
const size_t original_dst_size = dst.size();
while (i < sz) {
auto val = get(i++);
dst.add(val);
Expand All @@ -254,7 +255,7 @@ void ArrayMixed::move(ArrayMixed& dst, size_t ndx)
Array keys(Array::get_alloc());
keys.set_parent(const_cast<ArrayMixed*>(this), payload_idx_key);
keys.init_from_ref(ref);
for (size_t j = 0, i = ndx; i < sz; i++, j++) {
for (size_t j = original_dst_size, i = ndx; i < sz; i++, j++) {
dst.set_key(j, keys.get(i));
}
keys.truncate(ndx);
Expand Down
7 changes: 7 additions & 0 deletions src/realm/chunked_binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ bool ChunkedBinaryData::is_null() const
return chunk.is_null();
}

bool ChunkedBinaryData::empty() const
{
BinaryIterator copy = m_begin;
BinaryData chunk = copy.get_next();
return chunk.size() == 0;
}

char ChunkedBinaryData::operator[](size_t index) const
{
BinaryIterator copy = m_begin;
Expand Down
3 changes: 3 additions & 0 deletions src/realm/chunked_binary.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ class ChunkedBinaryData {
/// the first chunk points to the nullptr.
bool is_null() const;

/// Equivalent to `size() == 0`, but O(1) rather than O(N).
bool empty() const;

/// FIXME: O(n)
char operator[](size_t index) const;

Expand Down
Loading

0 comments on commit 997f636

Please sign in to comment.