Details
-
Bug
-
Status: Needs Triage
-
Major - P3
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
-
MacOS
Mongosh v1.3.1
MongoDB v4.0 & v4.4
Description
Problem Statement/Rationale
Mongosh cannot process the commands below
test> db.setProfilingLevel(0, { slowms: 100, sampleRate: 1})
MongoServerError: BSON field 'profile.sampleRate' is the wrong type 'int', expected type 'double'
test> db.setProfilingLevel(0, { slowms: 100, sampleRate: 1.0})
MongoServerError: BSON field 'profile.sampleRate' is the wrong type 'int', expected type 'double'
Steps to Reproduce
Run the command
test> db.setProfilingLevel(0, { slowms: 100, sampleRate: 1})
Expected Results
db.setProfilingLevel(0, { slowms: 100, sampleRate: 1})
{ was: 0, slowms: 100, sampleRate: 1, ok: 1 }
Actual Results
test> db.setProfilingLevel(0, { slowms: 100, sampleRate: 1})
MongoServerError: BSON field 'profile.sampleRate' is the wrong type 'int', expected type 'double'
Additional Notes
It works if I convert 1 or 1.0 to double using Double()
test> db.setProfilingLevel(0, { slowms: 100, sampleRate: Double(1)})
{ was: 0, slowms: 100, sampleRate: 1, ok: 1 }
Attachments
Issue Links
- related to
-
MONGOSH-967 Cannot resize oplog via mongosh
-
- Closed
-