Details
-
Improvement
-
Resolution: Fixed
-
Minor - P4
-
None
-
0.1
Description
Description
https://docs.mongodb.com/manual/reference/method/db.setProfilingLevel/ does not specify what the return value is.
I tried:
ruby-driver-rs:PRIMARY> db.setProfilingLevel(2,-1)
|
{
|
"was" : 1,
|
"slowms" : 0,
|
"sampleRate" : 1,
|
"ok" : 1,
|
"$clusterTime" : {
|
"clusterTime" : Timestamp(1547760253, 1),
|
"signature" : {
|
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
|
"keyId" : NumberLong(0)
|
}
|
},
|
"operationTime" : Timestamp(1547760253, 1)
|
}
|
`was:1` makes sense, but `slowms:0` not so much. It appears to be the old value of slowms, but the key name does not indicate that the value returned is the old value.
Scope of changes
At minimum, document that setProfilingLevel returns the previous value of anything modified in the command/method.