[SERVER-81524] No-op invocations of setUserWriteBlockMode must await majority confirmation of SystemLastOpTime Created: 28/Sep/23 Updated: 05/Feb/24 Resolved: 31/Oct/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.2.0-rc0, 6.0.12, 7.0.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Spencer Jackson | Assignee: | Spencer Jackson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Server Security
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v7.0, v6.0
|
||||||||||||
| Sprint: | Security 2023-10-16, Security 2023-10-30, Security 2023-11-13 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 100 | ||||||||||||
| Description |
|
If setUserWriteBlockMode changes a primary's user write block mode, it will issue a write to a system collection. If the primary's user write block mode disposition is unchanged, then the command is a no-op and no write is issued. Either way, the command doesn't know whether the rest of the replicaset agrees with the local state yet, and so will await majority confirmation of the active Client object's last written OpTime. Unfortunately, the no-op variant of the command does not advance the OpTime. If an election occurs after the OpTime is stored in the Client but before commit is awaited, waiting will fail with an error. It will not be possible to re-run the command on the same connection, because the OpTime is never advanced. Instead, if we find that we're eliding writes, we should advance the Client's OpTime using setLastOpToSystemLastOpTime |
| Comments |
| Comment by Githook User [ 08/Nov/23 ] |
|
Author: {'name': 'Spencer Jackson', 'email': 'spencer.jackson@mongodb.com', 'username': 'spencerjackson'}Message: (cherry picked from commit 8cd4489cee257685e748b96443c7b509836f04d4) |
| Comment by Githook User [ 07/Nov/23 ] |
|
Author: {'name': 'Spencer Jackson', 'email': 'spencer.jackson@mongodb.com', 'username': 'spencerjackson'}Message: (cherry picked from commit 8cd4489cee257685e748b96443c7b509836f04d4) |
| Comment by Githook User [ 31/Oct/23 ] |
|
Author: {'name': 'Spencer Jackson', 'email': 'spencer.jackson@mongodb.com', 'username': 'spencerjackson'}Message: |