[SERVER-23901] bypassDocumentValidation no longer accepts numeric types Created: 25/Apr/16  Updated: 16/May/16  Resolved: 29/Apr/16

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: None
Fix Version/s: 3.3.6

Type: Bug Priority: Major - P3
Reporter: David Golden Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Build a recent mongod from the master branch (e.g. 5f7c803e8dba959e5da4135b76a1d1e05d75636d), run it and connect via mongo:

> db.runCommand({insert:"foo", documents:[ {x:1} ], bypassDocumentValidation: 1})
{
        "ok" : 0,
        "errmsg" : "Wrong type for 'bypassDocumentValidation'. Expected a bool, got a double.",
        "code" : 14
}
> db.runCommand({insert:"foo", documents:[ {x:1} ], bypassDocumentValidation: NumberInt(1)})
{
        "ok" : 0,
        "errmsg" : "Wrong type for 'bypassDocumentValidation'. Expected a bool, got a int.",
        "code" : 14
}
> db.runCommand({insert:"foo", documents:[ {x:1} ], bypassDocumentValidation: true})
{ "n" : 1, "ok" : 1 }

In released versions, numeric values are accepted.

Sprint: Integrate+Tuning 14 (05/13/16)
Participants:

 Description   

Perl driver nightly Jenkins runs started failing a few days ago with this error message: Wrong type for 'bypassDocumentValidation'. Expected a bool, got a int

It looks like the master branch tightened the acceptable types for this option compared to previously released versions of the server.



 Comments   
Comment by Githook User [ 29/Apr/16 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-23901 make write commands accept any type for bypassDocumentValidation
Branch: master
https://github.com/mongodb/mongo/commit/d2ca3517188d7912768d3aed8b6eaeaec2ff4d02

Comment by David Storch [ 25/Apr/16 ]

redbeard0531, is this due to your recent refactor of the write path in SERVER-23128?

Generated at Thu Feb 08 04:04:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.