You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add opt-in to multi-collection support with `mongocrypt_setopt_enable_multiple_collinfo`
Require opting in to enable multi-collection support.
Require drivers to signal that the new protocol for `MONGOCRYPT_CTX_NEED_MONGO_COLLINFO` is implemented.
* add `mc_schema_broker_has_multiple_requests`
Used to implement opt-in check
* parse $lookup
* add version check for mongocryptd
* add version check for crypt shared
* add option to skip init in tests
Useful to further configure `mongocrypt_t` before test
* test multi-collection commands
Test $lookup is supported.
Test $unionWith and $facet are parsed.
Test opt-in is required to support multiple collections.
Test mongocryptd/crypt_shared version is checked.
* increase `TEST_DATA_COUNT`
To fix observed test failures on Evergreen
---------
Co-authored-by: Ezra Chung <[email protected]>
> <aname="multi-collection-commands"></a> **Multi-collection commands**: prior to 1.13.0, drivers were expected to pass _at most one result_ from `listCollections`. In 1.13.0, drivers are expected to pass _all results_ from `listCollections` to support multi-collection commands (e.g. aggregate with `$lookup`).
145
+
>
146
+
> Drivers must call `mongocrypt_setopt_enable_multiple_collinfo` to indicate the new behavior is implemented and opt-in to support for multi-collection commands. This opt-in is to prevent the following bug scenario:
147
+
> > A driver upgrades to 1.13.0, but does not update prior behavior which passes at most one result of a multi-collection command.
148
+
> > A multi-collection command requests schemas for both `db.c1` and `db.c2`.
149
+
> > The driver only passes the result for `db.c1` even though `db.c2` also has a result.
150
+
> > Therefore, libmongocrypt incorrectly believes `db.c2` has no schema.
151
+
143
152
**libmongocrypt needs**...
144
153
145
154
A result from a listCollections cursor.
@@ -148,7 +157,7 @@ A result from a listCollections cursor.
148
157
149
158
1. Run listCollections on the encrypted MongoClient with the filter
150
159
provided by `mongocrypt_ctx_mongo_op`
151
-
2.Return the first result (if any) with `mongocrypt_ctx_mongo_feed` or proceed to the next step if nothing was returned.
160
+
2.Pass all results (if any) with calls to `mongocrypt_ctx_mongo_feed` or proceed to the next step if nothing was returned. Results may be passed in any order.
See [note](#multi-collection-commands) about multi-collection commands.
170
+
160
171
**libmongocrypt needs**...
161
172
162
173
Results from a listCollections cursor from a specified database.
@@ -165,7 +176,7 @@ Results from a listCollections cursor from a specified database.
165
176
166
177
1. Run listCollections on the encrypted MongoClient with the filter
167
178
provided by `mongocrypt_ctx_mongo_op` on the database provided by `mongocrypt_ctx_mongo_db`.
168
-
2.Return the first result (if any) with `mongocrypt_ctx_mongo_feed` or proceed to the next step if nothing was returned.
179
+
2.Pass all results (if any) with calls to `mongocrypt_ctx_mongo_feed` or proceed to the next step if nothing was returned. Results may be passed in any order.
0 commit comments