-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Fully Compatible
-
QO 2022-03-21, QO 2022-04-04, QO 2022-04-18
-
163
From the design:
findAndModify commands are minimally rewritten before being more-or-less "blindly" passed on to the relevant shard, since the query must have an equality condition on the shard key in order to precisely target a single shard. We will have to do some more processing than for the find() command because the command BSON is not fully parsed. If there may be FLE2 rewrites to be done and we are inside of a transaction, we will add this procedure after the first rewrite:
- Inspect the command BSON to determine if there may be rewrites to be done
- Parse the "query" sub-object into a MatchExpression
- Rewrite the parsed query using rewriteQueryOnEncryptedFields()
- Serialized rewritten MatchExpression to BSON
- Replace "query" sub-object of command with the rewritten MatchExpression.
- is duplicated by
-
SERVER-63300 Server-side rewrite for findAndModify query portion only for mongod
- Closed