[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:
Duplicate
is duplicated by SERVER-43185 write concern accepts malformed docum... Closed
Related
related to SERVER-31846 Provide error message when $exists : ... Backlog
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.

Generated at Thu Feb 08 03:30:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.