-
Type: Investigation
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Starting in version 6.2, the applyOps command will no longer accept the "preCondition" field. An attempt to run an applyOps command with the "preCondition" field will result in error code 6711600 with message "applyOps command no longer supports the 'preCondition' option".
To our knowledge, "preCondition" is never used against a 6.2+ mongod, but I am alerting potentially affected downstream teams just in case.
Description of Linked Ticket
The applyOps command currently supports a "preCondition" field. However, this is no longer used by any of our tools and should be removed.
TheĀ "preCondition" field consists of an array of query predicates and corresponding match expressions. When applyOps runs, the system internally runs findOne queries and verifies that the resulting documents match the paired match expressions. Aside from the fact that "preCondition" is no longer used, a good reason to delete the code is that the q field within each individual condition describes the query as though it were an OP_QUERY wire protocol message. We removed support for OP_QUERY in 5.1 and deleted most of the code. However, supporting the q field of each precondition requires us to keep some ancient query parsing code from the days of OP_QUERY around – and this is code that is not used in the normal query processing path.
The work for this ticket is to double-check that no tools are relying on "preCondition" anymore, and then to delete the code for it. It's possible that this will permit deletion of some OP_QUERY-related code as well, so please check with the Query Team about this when this ticket is completed.
- depends on
-
SERVER-67116 Remove support for applyOps command preCondition field
- Closed