Skip to content

Commit 0f990ca

Browse files
CXX-2828 QE Range Protocol V2 (#1162)
Adds support for the stable range protocol and addresses related issues: - Sync range spec tests and implement range defaults prose test - Debian 11 (MongoDB latest) removed and replaced with Debian 12 - Various small code changes to address warnings - Update C driver to 1.28 --------- Co-authored-by: Kevin Albertson <[email protected]>
1 parent 87fe3eb commit 0f990ca

File tree

80 files changed

+2362
-879
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2362
-879
lines changed

.evergreen/compile.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,12 @@ linux*)
154154
if [[ "${distro_id:?}" != rhel7* ]]; then
155155
cxx_flags+=("-Wno-expansion-to-defined")
156156
else
157-
cxx_flags+=("-Wno-unused-parameter") # TODO: remove once C driver is upgraded to include fix of CDRIVER-5673.
157+
cc_flags+=("-Wno-maybe-uninitialized") # Ignore false-positive warning in C driver build.
158+
fi
159+
160+
if [[ "${distro_id:?}" == debian12* ]]; then
161+
# Disable `restrict` warning on GCC 12 due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
162+
cxx_flags+=("-Wno-error=restrict")
158163
fi
159164
;;
160165
*)

.mci.yml

+5-21
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ variables:
1212
# If updating mongoc_version_minimum, also update:
1313
# - the default value of --c-driver-build-ref in etc/make_release.py
1414
# - LIBMONGOC_REQUIRED_VERSION in src/mongocxx/CMakeLists.txt
15-
mongoc_version_minimum: &mongoc_version_minimum "1.25.0"
15+
# - the PURL version in etc/purls.txt
16+
mongoc_version_minimum: &mongoc_version_minimum "1.28.0"
1617

1718
integration_matrix:
1819
integration_matrix_tasks_single: &integration_matrix_tasks_single
@@ -1706,13 +1707,13 @@ buildvariants:
17061707
- name: compile_and_test_with_shared_libs_sharded_cluster_with_libmongocrypt
17071708
- name: build_example_with_add_subdirectory
17081709

1709-
- name: debian11-release-latest
1710-
display_name: "Debian 11 Release (MongoDB Latest)"
1710+
- name: debian12-release-latest
1711+
display_name: "Debian 12 Release (MongoDB Latest)"
17111712
expansions:
17121713
build_type: "Release"
17131714
mongodb_version: "latest"
17141715
run_on:
1715-
- debian11-large
1716+
- debian12-large
17161717
tasks:
17171718
- name: compile_and_test_with_shared_libs
17181719
- name: compile_and_test_with_shared_libs_extra_alignment
@@ -1744,23 +1745,6 @@ buildvariants:
17441745
- name: build_example_with_add_subdirectory
17451746
- name: uninstall_check
17461747

1747-
- name: debian10-release-latest
1748-
display_name: "Debian 10 Release (MongoDB Latest)"
1749-
expansions:
1750-
build_type: "Release"
1751-
mongodb_version: "latest"
1752-
run_on:
1753-
- debian10-large
1754-
tasks:
1755-
- name: compile_and_test_with_shared_libs
1756-
- name: compile_and_test_with_shared_libs_extra_alignment
1757-
- name: compile_and_test_with_static_libs
1758-
- name: compile_and_test_with_static_libs_extra_alignment
1759-
- name: compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
1760-
- name: compile_and_test_with_shared_libs_sharded_cluster_with_libmongocrypt
1761-
- name: build_example_with_add_subdirectory
1762-
- name: uninstall_check
1763-
17641748
- name: debian10-release-50
17651749
display_name: "Debian 10 Release (MongoDB 5.0)"
17661750
expansions:

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ Changes prior to 3.9.0 are documented as [release notes on GitHub](https://githu
99

1010
## 3.11.0 [Unreleased]
1111

12+
### Added
13+
- Introduces stable support for In-Use Encryption range indexes.
14+
1215
### Changed
1316

1417
- `FetchContent_MakeAvailable()` is used to populate dependencies instead of `FetchContent_Populate()` for the Mongo C Driver (when not provided by `CMAKE_PREFIX_PATH`) and mnmlstc/core (when automatically selected or when `BSONCXX_POLY_USE_MNMLSTC=ON`).
1518
- Note: `FetchContent_Populate()` is still used for mnmlstc/core for CMake versions prior to 3.18 to avoid `add_subdirectory()` behavior.
1619
- Test suite now uses Catch2 v3 via FetchContent instead of the bundled Catch2 v2 standalone header.
1720
- C++14 or newer is now required to build tests when enabled with `ENABLE_TESTS=ON`.
21+
- Bump minimum C Driver version to [1.28.0](https://github.com/mongodb/mongo-c-driver/releases/tag/1.28.0).
1822

1923
### Deprecated
2024

CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ else()
4949
endif()
5050

5151
# Also update etc/purls.txt.
52-
set(LIBBSON_REQUIRED_VERSION 1.25.0)
52+
set(LIBBSON_REQUIRED_VERSION 1.28.0)
5353
set(LIBBSON_REQUIRED_ABI_VERSION 1.0)
5454

5555
# Also update etc/purls.txt.
56-
set(LIBMONGOC_REQUIRED_VERSION 1.25.0)
57-
set(LIBMONGOC_DOWNLOAD_VERSION 1.25.0)
56+
set(LIBMONGOC_REQUIRED_VERSION 1.28.0)
57+
set(LIBMONGOC_DOWNLOAD_VERSION 1.28.0)
5858
set(LIBMONGOC_REQUIRED_ABI_VERSION 1.0)
5959

6060
set(NEED_DOWNLOAD_C_DRIVER false)

data/client_side_encryption/explicit-encryption/range-encryptedFields-Date.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
"path": "encryptedDate",
1111
"bsonType": "date",
1212
"queries": {
13-
"queryType": "rangePreview",
13+
"queryType": "range",
1414
"contention": {
1515
"$numberLong": "0"
1616
},
17+
"trimFactor": {
18+
"$numberInt": "1"
19+
},
1720
"sparsity": {
1821
"$numberLong": "1"
1922
},

data/client_side_encryption/explicit-encryption/range-encryptedFields-DecimalNoPrecision.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
"path": "encryptedDecimalNoPrecision",
1111
"bsonType": "decimal",
1212
"queries": {
13-
"queryType": "rangePreview",
13+
"queryType": "range",
1414
"contention": {
1515
"$numberLong": "0"
1616
},
17+
"trimFactor": {
18+
"$numberInt": "1"
19+
},
1720
"sparsity": {
1821
"$numberLong": "1"
1922
}

data/client_side_encryption/explicit-encryption/range-encryptedFields-DecimalPrecision.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
"path": "encryptedDecimalPrecision",
1111
"bsonType": "decimal",
1212
"queries": {
13-
"queryType": "rangePreview",
13+
"queryType": "range",
1414
"contention": {
1515
"$numberLong": "0"
1616
},
17+
"trimFactor": {
18+
"$numberInt": "1"
19+
},
1720
"sparsity": {
1821
"$numberLong": "1"
1922
},

data/client_side_encryption/explicit-encryption/range-encryptedFields-DoubleNoPrecision.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
"path": "encryptedDoubleNoPrecision",
1111
"bsonType": "double",
1212
"queries": {
13-
"queryType": "rangePreview",
13+
"queryType": "range",
1414
"contention": {
1515
"$numberLong": "0"
1616
},
17+
"trimFactor": {
18+
"$numberInt": "1"
19+
},
1720
"sparsity": {
1821
"$numberLong": "1"
1922
}

data/client_side_encryption/explicit-encryption/range-encryptedFields-DoublePrecision.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
"path": "encryptedDoublePrecision",
1111
"bsonType": "double",
1212
"queries": {
13-
"queryType": "rangePreview",
13+
"queryType": "range",
1414
"contention": {
1515
"$numberLong": "0"
1616
},
17+
"trimFactor": {
18+
"$numberInt": "1"
19+
},
1720
"sparsity": {
1821
"$numberLong": "1"
1922
},

data/client_side_encryption/explicit-encryption/range-encryptedFields-Int.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
"path": "encryptedInt",
1111
"bsonType": "int",
1212
"queries": {
13-
"queryType": "rangePreview",
13+
"queryType": "range",
1414
"contention": {
1515
"$numberLong": "0"
1616
},
17+
"trimFactor": {
18+
"$numberInt": "1"
19+
},
1720
"sparsity": {
1821
"$numberLong": "1"
1922
},

data/client_side_encryption/explicit-encryption/range-encryptedFields-Long.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
"path": "encryptedLong",
1111
"bsonType": "long",
1212
"queries": {
13-
"queryType": "rangePreview",
13+
"queryType": "range",
1414
"contention": {
1515
"$numberLong": "0"
1616
},
17+
"trimFactor": {
18+
"$numberInt": "1"
19+
},
1720
"sparsity": {
1821
"$numberLong": "1"
1922
},

data/client_side_encryption/legacy/azureKMS.json

+11
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,17 @@
7878
"bsonType": "string",
7979
"algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
8080
}
81+
},
82+
"encrypted_string_kmip_delegated": {
83+
"encrypt": {
84+
"keyId": [
85+
{
86+
"$uuid": "7411e9af-c688-4df7-8143-5e60ae96cba6"
87+
}
88+
],
89+
"bsonType": "string",
90+
"algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
91+
}
8192
}
8293
},
8394
"bsonType": "object"

data/client_side_encryption/legacy/fle2v2-Compact.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"runOn": [
33
{
44
"minServerVersion": "7.0.0",
5-
"serverless": "forbid",
65
"topology": [
76
"replicaset",
87
"sharded",
@@ -131,6 +130,9 @@
131130
"command": {
132131
"compactStructuredEncryptionData": "default"
133132
}
133+
},
134+
"result": {
135+
"ok": 1
134136
}
135137
}
136138
],

0 commit comments

Comments
 (0)