Skip to content

Commit

Permalink
Array compression with collections in Mixed (#7412)
Browse files Browse the repository at this point in the history
* Prepare next-major

* Remove support for upgrading from pre core-6 (v10) (#6090)

* Optimize size of ArrayDecimal128 (#6111)

Optimize storage of Decimal128 properties so that the individual values will take up 0 bits (if all nulls or all zero), 32 bits, 64 bits or 128 bits depending on what is needed.

* update next major to core 13.4.1 (#6310)

* temporary disable failing c api decimal test

* Revert "update next major to core 13.4.1" (#6312)

* Revert "update next major to core 13.4.1 (#6310)"

This reverts commit 59764a2.

* appease format checks

* Align dictionaries to Lists and Sets when they are cleared.  (#6254)

* Fix storage of Decimal128 NaNs

* Allow Collections to be owned by Collections (#6447)

Introduce a new class - ColletionParent - which a collection will refer to as its owner. This class can be
specialized as an Obj if the nesting level is 0 or a CollectionList if the collection is nested.

* Add interface for defining columns of nested collections

* Add CollectionList class

* Change CollectionBase::set_owner() interface

Make it clear that when an Obj is the owner, then the index must be a ColKey

* Implementation `CollectionList::remove()` (#6381) (#6458)

Co-authored-by: Jørgen Edelbo <jorgen.edelbo@mongodb.com>

* Schema support for nesting collection (#6451)

Co-authored-by: Jørgen Edelbo <jorgen.edelbo@mongodb.com>

* Handle links in nested collections (#6470)

* Handle nullifying links in nested collections
* Clear backlinks related to nested collections

* Return collection type in Mixed (#6520)

* Print nested collections to Json (#6534)

* dump to json support info about nested collections for schema

* reuse logic for printing nested collections

* main logic for expanding nested collections to json, requires to be polished

* more testing for nested containers

* complete algo for printing nested collections in json format

* add testing json files to project

* generate json files option set to false

* run whole test suite

* test nested collections with links

* format checks

* Move out_mixed_json... functionality to Mixed class

* Remove not needed template parameter from CollectionBaseImpl

* Delegate to_json to collections

* remove commented code

* fix audit conflicts

---------

Co-authored-by: Jørgen Edelbo <jorgen.edelbo@mongodb.com>

* Simplify Obj::get_path()

* Store ref in ArrayMixed (#6565)

* Cleanup naming and consolidate update strategy
* Allow a Mixed containing a ref to be stores in ArrayMixed

* Actually store collection type in Mixed (#6583)

* Allow Dictionary to contain a collection (#6584)

* Make a template specializetion for Lst<Mixed>

* Allow Lst<Mixed> to contain a collections

* Streamlining interface (#6615)

Main change is that insert... will not return the created collection. This
has of course big influence on the test cases written for the old API.

Virtual interface for setting/getting nested collections created

* Api nested collections in OS (#6618)

Add interface on both object_store::Collection and the C API to handle collections in Mixed.
---------

Co-authored-by: Jørgen Edelbo <jorgen.edelbo@mongodb.com>

* Set interface nested collections (#6648)

* testing for set<mixed>

* c-api for nested sets

* fix Set constructor

* Get path from collection objects (#6636)

* Move NoOpTransactionLogParser to transact_log.hpp

* Add nested collection path in transaction log

* Optimize get_path()

Avoid having the first element in Path being a std::string

* Small fixes

* Make m_path private in sync::instr::Path

* Remove `set_string_compare_method` (#6668)

Partially based on 5f2dda1 Delete some obsolete cruft

set_string_compare_method() and everyhing related to it has never actually been
used by any SDK, and is not really the correct solution to the problem anyway.

Co-authored-by: Thomas Goyne <tg@realm.io>

* Replication of operations on nested collections

* Remove support for query over typed links in Dictionary

This feature is not exposed, and should not be done in the way
it was implemented.

* Use BPlusTree to hold backlinks (#6673)

Removes the limit on how many backlinks we can handle

* Add StablePath concept

* Collection in mixed notification support. (#6660)

* Add support in the notification machinery for nested collections.

* Avoid passing string parameters by value in KeyPathMapping interface

* Use uniform Path representation in query parser

We need to be able to handle a path that is just a sequence of strings
and integers. The strings can then either be a property name or a key
in a dictionary. Before we have known that the last entry in a path
would be a property name. We can't assume that anymore, so we just have
to follow links as long as that is possible. The rest must then be a path
to the wanted value.

We must also allow the syntax "dict.key" and dict["key"] to be used
interchangeably. A nested dictionary can be used in the same way as
an embedded object is used and so the syntax for querying on a specific
property should be the same.

* Support query on nested collections

This includes supporting using index in query on list of primitives

* Copy replication nested collections (#6714)

* copy replication for nested collections

* Remove support for TypedLinks in LinkTranslator

Removes some complexity/code. Is easy to re-introduce. Can be safely
removed if we disallow creating columns of this type. This can also
safely be done, as this feature is not yet used.

* Support typed links in nested collections

This is about the usual stuff:
 - When a link is inserted, make sure a backlink is created
 - When a link is cleared, make sure the backlink is removed.
 - When object containing a collection containing links is deleted
   make sure the backlinks are removed.
 - When the linked-to object is deleted the link should be nullified/removed.
 - When the linked-to object is made into a tombstone, the link should be updated.
 - When the linked-to object is recreated, the link should be restored.

* Handle exceptions thrown from Obj::get_collection_ref

* Support assigning a json string to a mixed property

Collect all to_json related functions in one compilation unit. Then
it will only be included in the final binary if used.

* Support having [*] as part of a path (#6741)

Allows you to consider all elements at some level.

* added check for set in mixed in the C API (#6764)

* Fix collection mismatch for `Set` in `Mixed`. (#6802)

* Allow TypedLinks to be part of path to property in queries

* Sorting stage 2 (#6669)

* Remove `set_string_compare_method`

Partially based on 5f2dda1 Delete some obsolete cruft

set_string_compare_method() and everyhing related to it has never actually been
used by any SDK, and is not really the correct solution to the problem anyway.

* strings are no longer equal to binaries

* parser supports bin(...) to differentiate binaries

* fix sectioned results

* fix formatting

* review updates

* Fix syntax

* review feedback changes

* fix reported UB

* lint

---------

Co-authored-by: Thomas Goyne <tg@realm.io>
Co-authored-by: Jørgen Edelbo <jorgen.edelbo@mongodb.com>

* Fix list type

* Syntactical sugar

* Throw if syncing a collection nested in Mixed

* Support indexing into link collections in Query (#6854)

* Support syncing nested Set

* Add missing support for getting Sets

* Return correct attachement state from nested collections (#6880)

Ensures that proper notifications on no longer existing collections are sent out

* small changes to the c api for collections in mixed (#6881)

* explicit insertion for collections in mixed and return the collection just inserted

* Make exceptions thrown by nested collections more consistent (#6875)

* Make information on the deletion of a collection available in C API (#6896)

* update set_collection for list and have an explicit function for each collection (#6900)

* Small changes

* Publish Obj::set_json in C API

* Check for stale accessors to a collction embedded directly in a Mixed property

Change the index held by the collection object from ColKey to a structure
(ColIndex) )containing both the index of the column and a key generated for
that particular collection. The key value is stored alongside the ref and
compared with the key value found in index when trying to obtain the ref
for the collection.

This commit includes review updates

* Fix freezing a nested collection

* Remove support for static nested collections

* Use more bits in ColIndex key

* Improve StringIndex::dump_node_structure

* Check for stale accessors to a collction embedded in a dictionary

Change the index held by the collection object from std::string to a structure
(KeyIndex) ) containing both the beginning of the dictionary key (mostly for
debugging purposes) and an index key generated for that particular collection.
The key value is stored alongside the ref and compared with the key value found
in index when trying to obtain the ref for the collection.

* Optimize StableIndex

* Refactor StringIndex interface (#6787)

* refactor StringIndex interface

optimize

* StringIndex has a virtual parent SearchIndex

* review feedback and fix a warning

* More consistent exception handling for nested collections

This commit fixes the problem that trying to access position 0 in a newly
created nested list would give an exception saying that the collection
was gone instead of an out-of-bounds exception. This was because we had a
test for attached before validating the index.

The solution selected is to remove "ensure_attached" and let the exceptions
thrown in "get_collection_ref" flow all the way to the client. This is kind of
fundamental change in that we must remove the noexcept specification from
"update_if_needed_with_status" and make the "init_from_parent" functions rethrow
the exceptions caught. The noexcept functions calling "update_if_..." must
add a try..catch block.

* Add ability to get collections from Results (#6948)

Co-authored-by: Nicola Cabiddu <nicola.cabiddu@mongodb.com>

* Fix compilation of RealmTrawler

* Logging mutations on tables (#6953)

To avoid having the same operation logged twice, the logging in instruction_applier
in removed.

* Simplify Logger class a bit

Logger::m_base_logger_ptr seems not to be used in the class itself.
The member is added to the sub-classes that need it.

get/set level_threshold need not be virtual is we remove support
for NullLogger.

* Limiting the output when logging large string and binary values (#6986)

* Introduce logging categories

* Sorting stage 3 (#6670)

* Add tests on BPlusTree upgrade

* change the sort order of strings

* Add test on upgrade of StringIndex and Set

* remove utf8_compare

* Add upgrade functionality

* Avoid string index upgrade

* Update test

* Move Set::do_resort() to .cpp file

* Generate test_upgrade_database_x_23.realm as on ARM

* Revert "Avoid string index upgrade"

This reverts commit 333982a.

* Fix upgrade logic for string index

- Only upgrade if char is signed
- Upgrade Mixed columns too

* memcmp is faster than std::lexi_cmp and doesn't require casting

* optimize: only compare strings once

* Upgrade of fulltext index not needed

* migrate sets of binaries and better migration test

* generate migration Realms on a signed platform

* fix lint

* avoid a string index migration by using linear search

---------

Co-authored-by: Jørgen Edelbo <jorgen.edelbo@mongodb.com>

* Upodate Package.swift

* Client Reset for collections in mixed / nested collections (#6766)

* Fix error after merge

* Fix issue using REALM_ENABLE_MEMDEBUG=On

* Logging of schema migrations

* Use logging categories (#7052)

* Logging notification activity

* Logging details when opening DB

* Fix warning

* Update bindgen to support logging categories

* Add cases handling Json::value_t::binary

* Log free space and history sizes when opening file

* Remove unused stuff

* Rearrange some code in Set<T>

The is to prepare for merge with master. It is more or less a cherry-pick
of commit bf5ffd3.

* Fix missing NullLogger

* Remove support for nested sets

* Fix warnings

* Remove type_LinkList and col_type_LinkList (#7114)

Should have been removed long time ago

* Index on list of strings (#7152)

* Prepare beta release

* Add path.hpp to installed headers

* Update release notes

* Allow keypath to be provided as argument (#7210)

* Remove set from realm_value_type for collections in mixed (#7245)

* Add support for collections in indexed mixed fields

* [C-API] Fix the return type of realm_set_collection (#7247)

* Fix the return type of realm_set_collection

* fix some leaking tests

* Simplify JSON functionality

* Don't leak implementation of BsonDocument and BsonArray to the users.

This is done by defining the interface explicitly and in a way that
makes it possible to easily change the underlying implementation.

* Throw when inserting an embedded object into a list of Mixed

* Fix queries on dictionaries in Mixed with @keys

* Optimize BsonDocument::find()

* Only output '_key': xxx when output mode is plain JSON

Fix 9169fa1

* Send notifitations about mutations on nested collections

* Restore correct expected json files

* Support querying for @SiZe on Mixed

This will make sense both for strings, binaries and nested collections.

* Support querying with @type on nested collections (#7288)

* Refactor ConstantNode::visit() (#7295)

This will allow us to use argument substitution in more places. In
particuler if TypeOfValue is expected.

The visit function in ConstantNode is split up i 2 steps. First the
value is extracted into a Mixed - that being directly from the query
string or from the arguments. Then the vaule is adapted to what is
needed based on the 'hint' parameter.

* Fix merge error in dependency list

* Fix using stringops query on nested collections

* Fix using ANY, NONE, ALL in query on Mixed property

* Remove LinkList (#7308)

* fix == NONE {x} queries (#7333)

* fix == NONE {x} queries

* more tests

* Fix app URI tests for baasaas (#7342)

* Mitigate races in accessing `m_initated` and `m_finalized` in various REALM_ASSERTs (#7338)

* Fix a TOCTOU race when copying Realm files

Checking if the destination exists before copying is a race condition as the
file can be created in between the check and the copy. Instead we should
attempt to copy without overwriting the target if it exists.

* Use clonefile() when possible in File::copy()

* Delete unused sync file action metadata fields

* Schema migration tests to use admin API rather than querying backing cluster (#7345)

* Add bson library (#7324)

Can be used as a reference implementation in tests.

* Fix Results nofitifation for changes to nested collections

* Use TestDirGuard where applicable

* Simplify session tests by consitently using TestSyncManager::fake_user()

* Separate TestSyncManager and OfflineAppSession

Co-authored-by: James Stone <james.stone@mongodb.com>

* Fix sync replication (#7343)

* Adjust CMake files to used by vcpkg (#7334)

* Fix SPM compilation errors (#7360)

Include paths for the tests are set up slightly different for the SPM build
from the CMake build.

* Prepare release

* Update release notes

* Prepare release

* Update release note

* Rewrite the "app: app destroyed during token refresh" test (#7363)

* Update to CHANGELOG

* Don't allow Core targets to be installed if submodule (#7379)

Co-authored-by: Kenneth Geisshirt <kenneth.geisshirt@mongodb.com>
Co-authored-by: Jørgen Edelbo <jorgen.edelbo@mongodb.com>

* Prepeare release

* Update release notes

* Do not populate list KVO information for non-list collections (#7378)

* Prevent opening files with file format 23 in read-only mode

* Don't update backlinks in Mixed self-assignment (#7384)

Setting a Mixed field to ObjLink equal to the current value removed the
existing backlink and then exited before adding the new one, leaving things in
an invalid state.

* Eliminate copies when accessing values from Bson types (#7377)

Returning things by value performs a deep copy, which is very expensive when
those things are also bson containers.

Re-align the naming with the convention names for the functions rather than
being weird and different.

* Use the correct allocator for queries on dictionaries over links (#7382)

The base table's allocator was being used to read from the target table.

* Bson object should hold binary data in decoded form

If you construct a Bson object from a std::vector<char>, the  extjson
streaming format should encode the binary data.

* Fix passing a double as argument to query on Decimal128 (#7387)

* Treat missing keys in dictionaries as null in queries (#7391)

* Treat missing keys in dictionaries as null in queries

* Fix test

---------

Co-authored-by: Jørgen Edelbo <jorgen.edelbo@mongodb.com>

* Allow using aggregate operations on Mixed properties in queries (#7398)

This is something which Cocoa and the query engine supports but the core query
parser did not.

* [bindgen] Enable support for collections in the `Mixed` data type (#7392)

* Adapt to breaking change.

* Expose APIs for flat collections in Mixed and add preparation for nested.

* Add and expose helper for getting the data type.

* Expose a data type enum that includes non-primitives.

The JS SDK needs this for checking types of Mixed.

* Update casting of enum constants.

* Replace access of 'm_type' with use of the 'int()' operator overload.

* Expose APIs for setting nested lists in Mixed.

* Expose APIs for setting nested dictionaries in Mixed.

* Expose APIs for getting nested lists in Mixed.

* Expose APIs for getting nested dictionaries in Mixed.

* Expose get_obj() on List and Set.

* Expose method for getting element type in List.

* Remove the need for element type helpers.

The JS SDK has managed to use sentinel values in the generated bindings instead.

* Remove unused header.

* Avoid doing unneeded logger work in Replication

Most of the replication log statements do some work including memory
allocations which are then thrown away if the log level it too high, so always
check the log level first. A few places don't actually benefit from this, but
it's easier to consistently check the log level every time.

* Prepare release

* RCORE-1990 Add X86 Windows Release builder to evergreen (#7383)

* Use the bfd linker in the armv7 toolchain (#7406)

* Fix several crashes in the object store benchmarks (#7403)

* add new index related benchmarks (#7401)

* Use updated curl on evergreen windows hosts (#7409)

* comment test not working + still missing handling for nested collections

* handle collection array for mixed types

* lint

* please windows builder warnings + x86

* proposed fix for 32-bit

* moved call outside assert macro

* Fix for 32 bit archs for encoded Arrays (#7427)

* tentative fix for 32 bit archs
* removed wrong cast to size_t from bf_iterator::set_value()
* fix inverted condition in 'unsigned_to_num_bits'
* fix inverted condition in 'unsigned_to_num_bits'

---------

Co-authored-by: Nicola Cabiddu <nicola.cabiddu@mongodb.com>

* lint

* Revert "lint"

This reverts commit 7ac0073.

* lint

---------

Co-authored-by: Jørgen Edelbo <jorgen.edelbo@mongodb.com>
Co-authored-by: James Stone <james.stone@mongodb.com>
Co-authored-by: Thomas Goyne <tg@realm.io>
Co-authored-by: Nikola Irinchev <irinchev@me.com>
Co-authored-by: Claus Rørbech <claus.rorbech@mongodb.com>
Co-authored-by: Kenneth Geisshirt <kenneth.geisshirt@mongodb.com>
Co-authored-by: Jonathan Reams <jbreams@mongodb.com>
Co-authored-by: Thomas Goyne <thomas.goyne@mongodb.com>
Co-authored-by: Lee Maguire <lee.maguire@mongodb.com>
Co-authored-by: LJ <81748770+elle-j@users.noreply.github.com>
Co-authored-by: Yavor Georgiev <fealebenpae@users.noreply.github.com>
Co-authored-by: Finn Schiermer Andersen <finn.schiermer.andersen@gmail.com>
  • Loading branch information
13 people committed Mar 7, 2024
1 parent a630309 commit 1eaa329
Show file tree
Hide file tree
Showing 423 changed files with 49,784 additions and 11,946 deletions.
149 changes: 141 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,159 @@

### Enhancements
* <New feature description> (PR [#????](https://github.com/realm/realm-core/pull/????))
* None.

### Fixed
* <How do the end-user experience this issue? what was the impact?> ([#????](https://github.com/realm/realm-core/issues/????), since v?.?.?)
* None.

### 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
* Fix several crashes when running the object store benchmarks ([#7403](https://github.com/realm/realm-core/pull/7403)).

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

# 14.1.0 Release notes

### Enhancements
* Add support for using aggregate operations on Mixed properties in queries ([PR #7398](https://github.com/realm/realm-core/pull/7398))

### Fixed
* Fix a performance regression when reading values from Bson containers and revert some breaking changes to the Bson API ([PR #7377](https://github.com/realm/realm-core/pull/7377), since v14.0.0)
* List KVO information was being populated for non-list collections ([PR #7378](https://github.com/realm/realm-core/pull/7378), since v14.0.0)
* Setting a Mixed property to an ObjLink equal to its existing value would remove the existing backlinks and then exit before re-adding them, resulting in later assertion failures due to the backlink state being invalid ([PR #7384](https://github.com/realm/realm-core/pull/7384), since v14.0.0).
* Passing a double as argument for a Query on Decimal128 did not work ([#7386](https://github.com/realm/realm-core/issues/7386), since v14.0.0)
* Opening file with file format 23 in read-only mode will crash ([#7388](https://github.com/realm/realm-core/issues/7388), since v14.0.0)
* Querying a dictionary over a link would sometimes result in out-of-bounds memory reads ([PR #7382](https://github.com/realm/realm-core/pull/7382), since v14.0.0).
* Restore the pre-14.0.0 behavior of missing keys in dictionaries in queries ([PR #7391](https://github.com/realm/realm-core/pull/7391))
* Fix a ~10% performance regression for bulk insertion when using a log level which does not include debug/trace ([PR #7400](https://github.com/realm/realm-core/pull/7400), 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.
You cannot open files with an file format older than v24 in read-only mode.

-----------

### Internals
* The Linux-armv7 cross-compiling toolchain file prefers the bfd linker over gold because of issues linking against OpenSSL 3.2.0.

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

# 14.0.1 Release notes

### Enhancements
* None.

### Fixed
* Fixed building issues when RealmCore is used as submodule ([#7370](https://github.com/realm/realm-core/pull/7379))
* None.

### 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.

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

# 14.0.0 Release notes

### Enhancements
* Property keypath in RQL can be substituted with value given as argument. Use '$P<i>' in query string. (Issue [#7033](https://github.com/realm/realm-core/issues/7033))
* You can now use query substitution for the @type argument ([#7289](https://github.com/realm/realm-core/issues/7289))

### Fixed
* Fixed crash when adding a collection to an indexed Mixed property ([#7246](https://github.com/realm/realm-core/issues/7246), since 14.0.0-beta.0)
* \[C-API] Fixed the return type of `realm_set_list` and `realm_set_dictionary` to be the newly inserted collection, similarly to the behavior of `list/dictionary_insert_collection` (PR [#7247](https://github.com/realm/realm-core/pull/7247), since 14.0.0-beta.0)
* Throw an exception when trying to insert an embedded object into a list of Mixed ([#7254](https://github.com/realm/realm-core/issues/7254), since 14.0.0-beta.0)
* Queries on dictionaries in Mixed with @keys did not return correct result ([#7255](https://github.com/realm/realm-core/issues/7255), since 14.0.0-beta.0)
* Changes to inner collections will not be reported by notifier on owning collection ([#7270](https://github.com/realm/realm-core/issues/7270), since 14.0.0-beta.0)
* @count/@size not supported for mixed properties ([#7280](https://github.com/realm/realm-core/issues/7280), since v10.0.0)
* Query with @type does not support filtering on collections ([#7281](https://github.com/realm/realm-core/issues/7281), since 14.0.0-beta.0)
* Query involving string operations on nested collections would not work ([#7282](https://github.com/realm/realm-core/issues/7282), since 14.0.0-beta.0)
* Using ANY, ALL or NONE in a query on nested collections would throw an exception ([#7283](https://github.com/realm/realm-core/issues/7283), since 14.0.0-beta.0)
* Results notifications does not report changes to inner collections ([#7335](https://github.com/realm/realm-core/issues/7335), since 14.0.0-beta.0)

### Breaking changes
* If you want to query using @type operation, you must use 'objectlink' to match links to objects. 'object' is reserved for dictionary types.

### Compatibility
* Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10 and onwards. If you want to upgrade from an earlier file format version you will have to use RealmCore v13.x.y or earlier.

-----------

### Internals
* to_json API changed according to https://docs.google.com/document/d/1YtJN0sC89LMb4UVcPKFIfwC0Hsi9Vj7sIEP2vHQzVcY/edit?usp=sharing. Links to non-embedded objects will never be followed.

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

# 14.0.0-beta.0 Release notes

### Enhancements
* Storage of Decimal128 properties has been optimised so that the individual values will take up 0 bits (if all nulls), 32 bits, 64 bits or 128 bits depending on what is needed. (PR [#6111](https://github.com/realm/realm-core/pull/6111))
* You can have a collection embedded in any Mixed property (except Set<Mixed>).
* Querying a specific entry in a collection (in particular 'first and 'last') is supported. (PR [#4269](https://github.com/realm/realm-core/issues/4269))
* Index on list of strings property now supported (PR [#7142](https://github.com/realm/realm-core/pull/7142))
* You can set the threshold levels for trace output on individual categories. (PR [#7004](https://github.com/realm/realm-core/pull/7004))

### Fixed
* Align dictionaries to Lists and Sets when they get cleared. ([#6205](https://github.com/realm/realm-core/issues/6205), since v10.4.0)
* Fixed equality queries on a Mixed property with an index possibly returning the wrong result if values of different types happened to have the same StringIndex hash. ([6407](https://github.com/realm/realm-core/issues/6407) since v11.0.0-beta.5).
* If you have more than 8388606 links pointing to one specific object, the program will crash. ([#6577](https://github.com/realm/realm-core/issues/6577), since v6.0.0)
* Query for NULL value in Dictionary<Mixed> would give wrong results ([6748])(https://github.com/realm/realm-core/issues/6748), since v10.0.0)
* A Realm generated on a non-apple ARM 64 device and copied to another platform (and vice-versa) were non-portable due to a sorting order difference. This impacts strings or binaries that have their first difference at a non-ascii character. These items may not be found in a set, or in an indexed column if the strings had a long common prefix (> 200 characters). ([PR #6670](https://github.com/realm/realm-core/pull/6670), since 2.0.0-rc7 for indexes, and since since the introduction of sets in v10.2.0)

### Breaking changes
* Support for upgrading from Realm files produced by RealmCore v5.23.9 or earlier is no longer supported.
* Remove `set_string_compare_method`, only one sort method is now supported which was previously called `STRING_COMPARE_CORE`.
* BinaryData and StringData are now strongly typed for comparisons and queries. This change is especially relevant when querying for a string constant on a Mixed property, as now only strings will be returned. If searching for BinaryData is desired, then that type must be specified by the constant. In RQL the new way to specify a binary constant is to use `mixed = bin('xyz')` or `mixed = binary('xyz')`. ([6407](https://github.com/realm/realm-core/issues/6407)).
* In the C API, `realm_collection_changes_get_num_changes` and `realm_dictionary_get_changes` have got an extra parameter to receive information on the deletion of the entire collection.
* Sorting order of strings has changed to use standard unicode codepoint order instead of grouping similar english letters together. A noticeable change will be from "aAbBzZ" to "ABZabz". ([2573](https://github.com/realm/realm-core/issues/2573))

### 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
* Refactoring of the StringIndex interface.

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

# 13.27.0 Release notes

### Enhancements
* Add support in the C API for receiving a notification when sync user state changes. ([#7302](https://github.com/realm/realm-core/pull/7302))
* Allow the query builder to construct >, >=, <, <= queries for string constants. This is a case sensitive lexicographical comparison. Improved performance of RQL (parsed) queries on a non-linked string property using: >, >=, <, <=, operators and fixed behaviour that a null string should be evaulated as less than everything, previously nulls were not matched. ([#3939](https://github.com/realm/realm-core/issues/3939), this is a prerequisite for https://github.com/realm/realm-swift/issues/8008).
* Updated bundled OpenSSL version to 3.2.0 (PR [#7303](https://github.com/realm/realm-core/pull/7303))
* Added `SyncSession::get_file_ident()` so you can trigger a client reset via the BAAS admin API ([PR #7203](https://github.com/realm/realm-core/pull/7203)).
* Audit event scopes containing zero events to save no longer open the audit realm unneccesarily ([PR #7332](https://github.com/realm/realm-core/pull/7332)).
* Added a method to check if a file needs upgrade. ([#7140](https://github.com/realm/realm-core/issues/7140))
* Use `clonefile()` when possible in `File::copy()` on Apple platforms for faster copying. ([PR #7341](https://github.com/realm/realm-core/pull/7341)).

### Fixed
* Fixed queries like `indexed_property == NONE {x}` which mistakenly matched on only x instead of not x. This only applies when an indexed property with equality (==, or IN) matches with `NONE` on a list of one item. If the constant list contained more than one value then it was working correctly. ([realm-js #7862](https://github.com/realm/realm-java/issues/7862), since v12.5.0)
* Uploading the changesets recovered during an automatic client reset recovery may lead to 'Bad server version' errors and a new client reset. ([#7279](https://github.com/realm/realm-core/issues/7279), since v13.24.1)
* Fixed invalid data in error reason string when registering a subscription change notification after the subscription has already failed. ([#6839](https://github.com/realm/realm-core/issues/6839), since v11.8.0)
* Fixed crash in fulltext index using prefix search with no matches ([#7309](https://github.com/realm/realm-core/issues/7309), since v13.18.0)
* Fix compilation and some warnings when building with Xcode 15.3 ([PR #7297](https://github.com/realm/realm-core/pull/7297)).
* util::make_dir_recursive() attempted to create a directory named "\0" if the path did not have a trailing slash ([PR #7329](https://github.com/realm/realm-core/pull/7329)).
* Fixed a crash with `Assertion failed: m_initiated` during sync session startup ([#7074](https://github.com/realm/realm-core/issues/7074), since v10.0.0).
* Fixed a TSAN violation where the user thread could race to read `m_finalized` with the sync event loop ([#6844](https://github.com/realm/realm-core/issues/6844), since v13.15.1)
* Fix a minor race condition when backing up Realm files before a client reset which could have lead to overwriting an existing file. ([PR #7341](https://github.com/realm/realm-core/pull/7341)).

### Breaking changes
* None.
* SyncManager no longer supports reconfiguring after calling reset_for_testing(). SyncManager::configure() has been folded into the constructor, and reset_for_testing() has been renamed to tear_down_for_testing(). ([PR #7351](https://github.com/realm/realm-core/pull/7351))

### Compatibility
* Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.
Expand All @@ -31,6 +168,7 @@
* (bindgen) Upgrade `eslint-config-prettier` & `eslint-plugin-prettier` and add a missing peer dependency on `prettier`.
* The minimum CMake version has changed from 3.15 to 3.22.1. ([#6537](https://github.com/realm/realm-core/issues/6537))
* Update Catch2 to v3.5.2 ([PR #7297](https://github.com/realm/realm-core/pull/7297)).
* The unused `partition` and `user_local_uuid()` fields have been removed from `FileActionMetadata`. ([PR #7341](https://github.com/realm/realm-core/pull/7341)).

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

Expand Down Expand Up @@ -59,7 +197,7 @@
* Bump the sync protocol to v11. The new protocol version comes with the following changes:
- JSON_ERROR server message contains the previous schema version
- Flexible sync BIND client message contains the current schema version
* Add BAAS admin API to create new schema versions (drafts can be used to deploy all changes at once
* Add BAAS admin API to create new schema versions (drafts can be used to deploy all changes at once)

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

Expand All @@ -71,11 +209,6 @@
### Compatibility
* Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.

-----------

### Internals
* (bindgen) Upgrading `@commander-js/extra-typings` and adds a missing peer dependency on `commander`.

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

# 13.25.0 Release notes
Expand Down Expand Up @@ -342,7 +475,7 @@

### Compatibility
* Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.
* The metadata Realm used to store sync users has had its schema version bumped. It is automatically migrated to the new version on first open. Downgrading to older version of Realm after upgrading will discard stored user tokens and require logging back in.
* The metadata Realm used to store sync users has had its schema version bumped. It is automatically migrated to the new version on first open. Downgrading will require manually deletion of the metadata Realm and require logging back in.

-----------

Expand Down
Loading

0 comments on commit 1eaa329

Please sign in to comment.