[COMPASS-6129] Investigate changes in SERVER-67116: Remove support for applyOps command preCondition field Created: 14/Sep/22  Updated: 19/Sep/22  Resolved: 19/Sep/22

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: No version

Type: Investigation Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-67116 Remove support for applyOps command p... Closed
Documentation Changes: Not Needed

 Description   
Original Downstream Change Summary

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.



 Comments   
Comment by Anna Henningsen [ 19/Sep/22 ]

No impact

Generated at Wed Feb 07 22:42:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.