[SERVER-60817] setDefaultRWConcern accepts invalid write concern options Created: 19/Oct/21 Updated: 04/Feb/24 Resolved: 20/Jan/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.3.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Samyukta Lanka | Assignee: | Gabriel Marks |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Sprint: | Security 2022-01-24, Replication 2021-12-13, Replication 2021-12-27, Replication 2022-01-10 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||
| Linked BF Score: | 167 | ||||||||||||||||
| Description |
|
setDefaultRWConcern accepts invalid write concern options like {w: "1"}, but the server will error with UnknownReplWriteConcern when trying to do an actual write. We should either start accepting {w: "1"} or error at the time of setting the default read/write concern. |
| Comments |
| Comment by Githook User [ 20/Jan/22 ] | |
|
Author: {'name': 'Gabriel Marks', 'email': 'gabriel.marks@mongodb.com', 'username': 'marksg07'}Message: | |
| Comment by Githook User [ 19/Jan/22 ] | |
|
Author: {'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}Message: Revert " This reverts commit 4c96930ccb001d91fd188380f80756c19f1ad3c1. | |
| Comment by Githook User [ 18/Jan/22 ] | |
|
Author: {'name': 'Gabriel Marks', 'email': 'gabriel.marks@mongodb.com', 'username': 'marksg07'}Message: | |
| Comment by Moustafa Maher [ 25/Oct/21 ] | |
|
Accepting numbers as string will conflict with the "custom write concern name" tags. Look at this example:
|