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 }
- is duplicated by
-
MONGOSH-1357 MongoServerError: BSON field 'mirrorReads.samplingRate' is the wrong type 'int', expected type 'double'
- Closed
- related to
-
MONGOSH-967 Cannot resize oplog via mongosh
- Closed