[SERVER-30536] disallow applyOps non-atomic mode when preCondition flag is used Created: 07/Aug/17  Updated: 30/Oct/23  Resolved: 08/Aug/17

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.5.12

Type: Improvement Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-29802 Non-atomic applyOps command should no... Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2017-08-21
Participants:

 Description   

Currently, the server supports running applyOps in non-atomic mode when the preCondition flag is provided. Our current set of known use cases of preCondition generally run applyOps with CRUD ops only which causes applyOps to run in atomic mode.

This ticket proposes to always run applyOps in atomic mode when the preCondition flag is used.



 Comments   
Comment by Githook User [ 08/Aug/17 ]

Author:

{'username': 'benety', 'email': 'benety@mongodb.com', 'name': 'Benety Goh'}

Message: SERVER-30536 applyOps returns error if preCondition is used in non-atomic mode
Branch: master
https://github.com/mongodb/mongo/commit/5aa490e8af07e8c05acf235f7f745d715e0378a6

Comment by Spencer Brody (Inactive) [ 07/Aug/17 ]

I think rather than having the presence of a preCondition field change the behavior of applyOps to force atomic mode, we should error the command if we see a preCondition field when the command would otherwise not be allowed to run in atomic mode, so the behavior is more explicit to the user.

Generated at Thu Feb 08 04:24:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.