[SERVER-44333] mongos accepts empty wc on commands that don't support writeConcern Created: 31/Oct/19 Updated: 29/Oct/23 Resolved: 11/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc0, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kevin Pulo | Assignee: | Amirsaman Memaripour |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng, sharding-4.4-stabilization, sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
This is inconsistent with mongod, which always rejects the writeConcern field on commands where supportsWriteConcern() returns false. The problem is that this check is using !wcResult.usedDefault, rather than something like request.body.hasField(WriteConcernOptions::kWriteConcernField). mongod:
mongos:
|
| Comments |
| Comment by Githook User [ 30/Mar/20 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: Mongos should not accept an empty (default) write concern for commands that do not support write concerns. (cherry picked from commit e0077e34ae71580f99205db961980f0403665652) |
| Comment by Githook User [ 11/Mar/20 ] |
|
Author: {'username': 'samanca', 'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com'}Message: Mongos should not accept an empty (default) write concern for commands that do not support write concerns. |