Skip to content

Commit 16c1441

Browse files
committed
Merge tag 'v14.10.2' into next-major
2 parents 5c521a7 + f889f79 commit 16c1441

38 files changed

+596
-421
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,29 @@
2121

2222
----------------------------------------------
2323

24+
# 14.10.2 Release notes
25+
26+
### Enhancements
27+
* None.
28+
29+
### Fixed
30+
* `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).
31+
* 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)
32+
33+
### Breaking changes
34+
* None.
35+
36+
### Compatibility
37+
* 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.
38+
39+
-----------
40+
41+
### Internals
42+
* FLX download estimates are now tracked in a multiprocess-compatible manner ([PR #7780](https://github.com/realm/realm-core/pull/7780)).
43+
* 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)).
44+
45+
----------------------------------------------
46+
2447
# 14.10.1 Release notes
2548

2649
### Enhancements

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import PackageDescription
44
import Foundation
55

6-
let versionStr = "14.10.1"
6+
let versionStr = "14.10.2"
77
let versionPieces = versionStr.split(separator: "-")
88
let versionCompontents = versionPieces[0].split(separator: ".")
99
let versionExtra = versionPieces.count > 1 ? versionPieces[1] : ""

dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PACKAGE_NAME: realm-core
2-
VERSION: 14.10.1
2+
VERSION: 14.10.2
33
OPENSSL_VERSION: 3.2.0
44
ZLIB_VERSION: 1.2.13
55
# https://github.com/10gen/baas/commits

doc/development/how-to-release.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ The core release process is automated with github [actions](https://github.com/r
44
- Select the base branch that you would like to make a release from (usually this will be "master") in the drop down.
55
- Enter the version of the new release (eg. "10.123.1" or "4.5.0-CustDemo")
66

7-
2. This will create a PR, which you should look over and get someone else on the team to review. Verify the changelog by checking the PR description which has a list of commits since the last tag was made. If any changes are required, commit them to this PR's branch.
7+
2. This will create a PR, which you should look over and get someone else on the team to review. Verify the changelog by checking the PR description which has a list of commits since the last tag was made. If any changes are required, commit them to this PR's branch (please reorder commits such that the version change comes last as the last commit will be the one tagged). Verify that the base commit on the branch you are releasing has passed evergreen checks (or that the failures are known to be spurious and are tracked).
88

9-
3. When ready, merge the PR. You can squash if there are only "prepare release" changes, but use a "merge-commit" strategy if there are functional changes added manually to the PR (note that if using a merge strategy, the last commit after merge will be the one tagged, so you may want to reorder the commits so that the 'prepare' commit comes last). On merge, the "make-release" action will run. This will:
9+
3. When ready, merge the PR. You can squash if there are only "prepare release" changes, but use a "merge-commit" strategy if there are functional changes added manually to the PR. On merge, the "make-release" action will run which triggers a Github deployment. Someone from the `@realm/realm-core-team` must approve the deployment for this step to run. Find the Github [deployment](https://github.com/realm/realm-core/actions/workflows/make-release.yml) and approve it. This will:
1010
- Make a tag
1111
- Publish the release on Github
1212
- Open a PR to update the Changelog with the new template section
1313
- Announce the release in the #appx-releases slack channel
1414

15-
4. Find the newly generated PR that adds the new changelog section. Approve it and merge it.
15+
4. Find the newly generated PR that adds the new changelog section. Approve it and merge it. It has been discussed by the team that this PR can be approved and merged without initiating evergreen checks because it is an automated change that only affects CHANGELOG.md and originates from an approved template.
1616

1717
## Previous process
1818

src/realm/db.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,7 +1626,7 @@ bool DB::compact(bool bump_version_number, std::optional<const char*> output_enc
16261626
}
16271627
auto info = m_info;
16281628
Durability dura = Durability(info->durability);
1629-
std::string key_buffer;
1629+
std::unique_ptr<char[]> key_buffer;
16301630
const char* write_key = nullptr;
16311631
if (output_encryption_key) {
16321632
if (*output_encryption_key) {
@@ -1635,8 +1635,9 @@ bool DB::compact(bool bump_version_number, std::optional<const char*> output_enc
16351635
}
16361636
#if REALM_ENABLE_ENCRYPTION
16371637
else if (auto encryption = m_alloc.get_file().get_encryption()) {
1638-
key_buffer = encryption->get_key();
1639-
write_key = key_buffer.data();
1638+
key_buffer = std::make_unique<char[]>(64);
1639+
memcpy(key_buffer.get(), encryption->get_key(), 64);
1640+
write_key = key_buffer.get();
16401641
}
16411642
#endif
16421643
{
@@ -2184,14 +2185,15 @@ void DB::enable_wait_for_change()
21842185
m_wait_for_change_enabled = true;
21852186
}
21862187

2187-
bool DB::needs_file_format_upgrade(const std::string& file, const std::vector<char>& encryption_key)
2188+
bool DB::needs_file_format_upgrade(const std::string& file, Span<const char> encryption_key)
21882189
{
21892190
SlabAlloc alloc;
21902191
SlabAlloc::Config cfg;
21912192
cfg.session_initiator = false;
21922193
cfg.read_only = true;
21932194
cfg.no_create = true;
21942195
if (!encryption_key.empty()) {
2196+
REALM_ASSERT(encryption_key.size() == 64);
21952197
cfg.encryption_key = encryption_key.data();
21962198
}
21972199
try {

src/realm/db.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class DB : public std::enable_shared_from_this<DB> {
167167

168168
bool is_attached() const noexcept;
169169

170-
static bool needs_file_format_upgrade(const std::string& file, const std::vector<char>& encryption_key);
170+
static bool needs_file_format_upgrade(const std::string& file, util::Span<const char> encryption_key);
171171

172172
Allocator& get_alloc()
173173
{

src/realm/dictionary.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -823,10 +823,12 @@ size_t Dictionary::find_first(Mixed value) const
823823

824824
void Dictionary::clear()
825825
{
826-
if (size() > 0) {
827-
if (Replication* repl = get_replication()) {
828-
repl->dictionary_clear(*this);
829-
}
826+
auto sz = size();
827+
Replication* repl = Base::get_replication();
828+
if (repl && (sz > 0 || !m_col_key.is_collection() || m_level > 1)) {
829+
repl->dictionary_clear(*this);
830+
}
831+
if (sz > 0) {
830832
CascadeState cascade_state(CascadeState::Mode::Strong);
831833
bool recurse = remove_backlinks(cascade_state);
832834

src/realm/list.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,12 @@ void Lst<Mixed>::remove(size_t from, size_t to)
503503

504504
void Lst<Mixed>::clear()
505505
{
506-
if (size() > 0) {
507-
if (Replication* repl = Base::get_replication()) {
508-
repl->list_clear(*this);
509-
}
506+
auto sz = size();
507+
Replication* repl = Base::get_replication();
508+
if (repl && (sz > 0 || !m_col_key.is_collection() || m_level > 1)) {
509+
repl->list_clear(*this);
510+
}
511+
if (sz > 0) {
510512
CascadeState state;
511513
bool recurse = remove_backlinks(state);
512514

0 commit comments

Comments
 (0)