[SERVER-12979] Respond with error upon encountering unknown field names in writeConcern Created: 28/Feb/14 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Usability, Write Ops |
| Affects Version/s: | 2.6.0-rc0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Backlog - Replication Team |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | 26qa, asya | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Replication
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Currently unrecognized field names are silently ignored. Errorring can help protect against typos like {fync: true}and will correctly error if we add a new flag like journaledOnSlaves and it is sent to a server that doesn't support it. We may want to strictly validate all arguments to write commands for the same reason. |
| Comments |
| Comment by David Storch [ 02/Mar/20 ] |
|
judah.schvimer, FYI I've moved this ticket to the replication team's backlog. |
| Comment by Andy Schwerin [ 03/Mar/14 ] |
|
I think this should be done as part of a larger pass to unify command parsing, but it's a good idea. Right now, a typo in a writeConcern or getLastError command will cause a different write concern to be honored, with no warning to the client. |