Skip to content

Commit

Permalink
Merge branch 'master' into feature/convert-local-realm
Browse files Browse the repository at this point in the history
  • Loading branch information
jedelbo committed Jan 12, 2022
2 parents 20ed880 + eb25652 commit 75e0adc
Show file tree
Hide file tree
Showing 87 changed files with 13,364 additions and 986 deletions.
41 changes: 37 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,47 @@

### Enhancements
* <New feature description> (PR [#????](https://github.com/realm/realm-core/pull/????))
* Support arithmetric operations (+, -, *, /) in query parser. Operands can be properties and/or constants of numeric types (integer, float, double or Decimal128). You can now say something like "(age + 5) * 2 > child.age".
* Support for asynchronous transactions added. (PR [#5035](https://github.com/realm/realm-core/pull/5035))
* Support exporting data from a local realm to a synchonized realm. ([#5018](https://github.com/realm/realm-core/issues/5018))

### Fixed
* <How do the end-user experience this issue? what was the impact?> ([#????](https://github.com/realm/realm-core/issues/????), since v?.?.?)
* The release package was missing several headers (since 11.7.0).
* UserIdentity metadata table grows indefinitely. ([#5152](https://github.com/realm/realm-core/issues/5152), since v10.0.0)

### Breaking changes
* None.

### Compatibility
* Fileformat: Generates files with format v22. Reads and automatically upgrade from fileformat v5.

-----------

### Internals
* None.

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

# 11.8.0 Release notes

### Enhancements
* Support arithmetric operations (+, -, *, /) in query parser. Operands can be properties and/or constants of numeric types (integer, float, double or Decimal128). You can now say something like "(age + 5) * 2 > child.age".
* Support for asynchronous transactions added. (PR [#5035](https://github.com/realm/realm-core/pull/5035))
* FLX sync now properly handles write_not_allowed client reset errors ([#5147](https://github.com/realm/realm-core/pull/5147))
* `realm_delete_files` added to the C API, equivalent to `Realm::delete_files`. ([#5127](https://github.com/realm/realm-core/pull/5127))

### Fixed
* The release package was missing several headers (since v11.7.0).
* The sync client will now drain the receive queue when send fails with ECONNRESET - ensuring that any error message from the server gets received and processed. ([#5078](https://github.com/realm/realm-core/pull/5078))
* Schema validation was missing for embedded objects in sets, resulting in an unhelpful error being thrown if the user attempted to define one.
* Opening a Realm with a schema that has an orphaned embedded object type performed an extra empty write transaction (since v11.0.0).
* Freezing a Realm with a schema that has orphaned embeeded object types threw a "Wrong transactional state" exception (since v11.5.0).
* SyncManager::path_for_realm now returns a default path when FLX sync is enabled ([#5088](https://github.com/realm/realm-core/pull/5088))
* Having links in a property of Mixed type would lead to ill-formed JSON output when serializing the database. ([#5125](https://github.com/realm/realm-core/issues/5125), since v11.0.0)
* FLX sync QUERY messages are now ordered with UPLOAD messages ([#5135](https://github.com/realm/realm-core/pull/5135))
* Fixed race condition when waiting for state change notifications on FLX subscription sets that may have caused a hang ([#5146](https://github.com/realm/realm-core/pull/5146))
* SubscriptionSet::to_ext_json() now handles empty subscription sets correctly ([#5134](https://github.com/realm/realm-core/pull/5134))

### Breaking changes
* None.
* FLX SubscriptionSet type split into SubscriptionSet and MutableSubscriptionSet to add type safety ([#5092](https://github.com/realm/realm-core/pull/5092))

### Compatibility
* Fileformat: Generates files with format v22. Reads and automatically upgrade from fileformat v5.
Expand All @@ -25,6 +54,10 @@
* Fix issue compiling in debug mode for iOS.
* FLX sync now sends the query version in IDENT messages along with the query body ([#5093](https://github.com/realm/realm-core/pull/5093))
* Errors in C API no longer store or expose a std::exception_ptr. The comparison of realm_async_error_t now compares error code vs object identity. ([#5064](https://github.com/realm/realm-core/pull/5064))
* The JSON output is slightly changed in the event of link cycles. Nobody is expected to rely on that.
* Future::get_async() no longer requires its callback to be marked noexcept. ([#5130](https://github.com/realm/realm-core/pull/5130))
* SubscriptionSet no longer holds any database resources. ([#5150](https://github.com/realm/realm-core/pull/5150))
* ClientHistoryImpl::integrate_server_changesets now throws instead of returning a boolean to indicate success ([#5118](https://github.com/realm/realm-core/pull/5118))

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

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 = "11.7.0"
let versionStr = "11.8.0"
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.list
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PACKAGE_NAME=realm-core
VERSION=11.7.0
VERSION=11.8.0
OPENSSL_VERSION=1.1.1g
MDBREALM_TEST_SERVER_TAG=2021-10-25
86 changes: 86 additions & 0 deletions evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,74 @@ functions:
params:
file_location: realm-core/${task_name}_results.json

"run hang analyzer":
- command: shell.exec
params:
shell: bash
script: |-
set -o errexit
set -o verbose
if [[ ! -d realm-core ]]; then
echo "No source directory exists. Not running hang analyzer"
fi
TOP_DIR=$(pwd)/realm-core
mkdir realm-core/hang_analyzer_workdir; cd realm-core/hang_analyzer_workdir
${python3|python3} -m venv venv
# venv creates its Scripts/activate file with CLRF endings, which
# cygwin bash does not like. dos2unix it
# (See https://bugs.python.org/issue32451)
if [ "Windows_NT" = "$OS" ]; then
dos2unix "venv/Scripts/activate"
fi
export VIRTUAL_ENV_DISABLE_PROMPT=yes
if [ "Windows_NT" = "$OS" ]; then
# Need to quote the path on Windows to preserve the separator.
. "venv/Scripts/activate" 2> /tmp/activate_error.log
else
. venv/bin/activate 2> /tmp/activate_error.log
fi
if [ $? -ne 0 ]; then
echo "Failed to activate virtualenv: $(cat /tmp/activate_error.log)"
exit 1
fi
python=python
echo "python set to $(which $python)"
echo "Upgrading pip to 21.0.1"
# ref: https://github.com/grpc/grpc/issues/25082#issuecomment-778392661
if [ "$(uname -m)" = "arm64" ] && [ "$(uname)" == "Darwin" ]; then
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
fi
python -m pip --disable-pip-version-check install "pip==21.0.1" "wheel==0.37.0" || exit 1
REQUIREMENTS_PATH=$TOP_DIR/evergreen/hang_analyzer/requirements.txt
if [ "Windows_NT" = "$OS" ]; then
REQUIREMENTS_PATH=$(cygpath -w $REQUIREMENTS_PATH)
fi
python -m pip install -r $REQUIREMENTS_PATH || exit 1
echo "Going to run hang analyzer"
HANG_ANALYZER_PATH=$TOP_DIR/evergreen/hang_analyzer
if [ "Windows_NT" = "$OS" ]; then
HANG_ANALYZER_PATH=$(cygpath -w $HANG_ANALYZER_PATH)
fi
python $HANG_ANALYZER_PATH
timeout:
- func: "run hang analyzer"

tasks:
- name: compile
tags: [ "for_pull_requests" ]
Expand Down Expand Up @@ -499,6 +567,8 @@ task_groups:
- func: "fetch binaries"
teardown_task:
- func: "upload test results"
timeout:
- func: "run hang analyzer"
tasks:
- compile
- .test_suite
Expand All @@ -514,6 +584,8 @@ task_groups:
- func: "fetch binaries"
teardown_task:
- func: "upload test results"
timeout:
- func: "run hang analyzer"
tasks:
- compile
- "!.disabled_on_windows .test_suite"
Expand All @@ -527,6 +599,8 @@ task_groups:
- func: "fetch binaries"
teardown_task:
- func: "upload test results"
timeout:
- func: "run hang analyzer"
tasks:
- compile
- "!.disabled_on_windows .test_suite"
Expand All @@ -539,6 +613,8 @@ task_groups:
- func: "fetch binaries"
teardown_task:
- func: "upload test results"
timeout:
- func: "run hang analyzer"
tasks:
- compile
- .test_suite
Expand All @@ -551,6 +627,8 @@ task_groups:
- func: "fetch binaries"
teardown_task:
- func: "upload test results"
timeout:
- func: "run hang analyzer"
tasks:
- compile
- object-store-tests
Expand All @@ -564,6 +642,8 @@ task_groups:
vars:
cmake_build_type: "Release"
target_to_build: "benchmarks"
timeout:
- func: "run hang analyzer"
tasks:
- .benchmark

Expand All @@ -578,6 +658,8 @@ task_groups:
target_to_build: CoreTests
teardown_task:
- func: "upload test results"
timeout:
- func: "run hang analyzer"
tasks:
- long-running-core-tests

Expand Down Expand Up @@ -684,6 +766,7 @@ buildvariants:
fetch_missing_dependencies: On
curl: "/opt/mongodbtoolchain/v3/bin/curl"
run_tests_against_baas: On
python3: "/opt/mongodbtoolchain/v3/bin/python3"
tasks:
- name: compile_test_and_package
distros:
Expand All @@ -695,6 +778,7 @@ buildvariants:
expansions:
cmake_url: "https://s3.amazonaws.com/static.realm.io/evergreen-assets/cmake-3.20.3-linux-aarch64.tar.gz"
cmake_bindir: "./cmake_binaries/bin"
python3: "/opt/mongodbtoolchain/v3/bin/python3"
use_system_openssl: On
fetch_missing_dependencies: On
tasks:
Expand Down Expand Up @@ -796,6 +880,7 @@ buildvariants:
max_jobs: $(($(grep -c proc /proc/cpuinfo) / 2))
fetch_missing_dependencies: On
build_zlib: On
python3: "/cygdrive/c/python/python37/python.exe"
tasks:
- name: compile_test_and_package_windows
distros:
Expand All @@ -816,6 +901,7 @@ buildvariants:
max_jobs: $(($(grep -c proc /proc/cpuinfo) / 2))
fetch_missing_dependencies: On
build_zlib: On
python3: "/cygdrive/c/python/python37/python.exe"
tasks:
- name: compile_test_windows
distros:
Expand Down
39 changes: 39 additions & 0 deletions evergreen/hang_analyzer/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
from src.hang_analyzer import HangAnalyzer

from optparse import OptionParser

parser = OptionParser(description=__doc__)
parser.add_option(
'-m', '--process-match', dest='process_match', choices=['contains', 'exact'],
default='contains', help="Type of match for process names (-p & -g), specify 'contains', or"
" 'exact'. Note that the process name match performs the following"
" conversions: change all process names to lowecase, strip off the file"
" extension, like '.exe' on Windows. Default is 'contains'.")
parser.add_option('-p', '--process-names', dest='process_names',
help='Comma separated list of process names to analyze')
parser.add_option('-g', '--go-process-names', dest='go_process_names',
help='Comma separated list of go process names to analyze')
parser.add_option(
'-d', '--process-ids', dest='process_ids', default=None,
help='Comma separated list of process ids (PID) to analyze, overrides -p &'
' -g')
parser.add_option('-c', '--dump-core', dest='dump_core', action="store_true", default=False,
help='Dump core file for each analyzed process')
parser.add_option('-s', '--max-core-dumps-size', dest='max_core_dumps_size', default=10000,
help='Maximum total size of core dumps to keep in megabytes')
parser.add_option(
'-o', '--debugger-output', dest='debugger_output', action="append",
choices=['file', 'stdout'], default=['stdout'],
help="If 'stdout', then the debugger's output is written to the Python"
" process's stdout. If 'file', then the debugger's output is written"
" to a file named debugger_<process>_<pid>.log for each process it"
" attaches to. This option can be specified multiple times on the"
" command line to have the debugger's output written to multiple"
" locations. By default, the debugger's output is written only to the"
" Python process's stdout.")

(options, _) = parser.parse_args()

print("going to analyze")
analyzer = HangAnalyzer(options)
analyzer.execute()
3 changes: 3 additions & 0 deletions evergreen/hang_analyzer/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pypiwin32==223; sys_platform == "win32" and python_version > "3"
pywin32==225; sys_platform == "win32" and python_version > "3"
distro == 1.5.0
Loading

0 comments on commit 75e0adc

Please sign in to comment.