[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: |
|
||||||||
| 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: |
| 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. |