|
SERVER-29794 generally implements comment on all commands in 4.4 and is available only if featureCompatibilityVersion is set to 4.4. SERVER-44847 removes the old comment command for count in 5.0.
I expect
db.runCommand({count: "documents", comment: true })
|
to work on both 4.4 and 5.0.
However, using this command in 4.4.12 with
db.adminCommand( { setFeatureCompatibilityVersion: "4.4" } )
|
does not accept
db.runCommand({count: "documents", comment: true })
|
and returns the error:
"errmsg" : "BSON field 'count.comment' is the wrong type 'bool', expected type 'string'",
|
I suspect in 4.4, the comment command that SERVER-44847 removes is being used instead of SERVER-29794.
This is inconsistent with our documentation that says the comment can be "any valid BSON type (string, integer, object, array, etc)."
|