-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
QE 2022-03-07
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)."
- is depended on by
-
DRIVERS-2188 Add 'comment' option to EstimatedDocumentCountOptions
- Closed
- is duplicated by
-
SERVER-65954 Sharded clusters v4.2, 4.0, and 3.6 do not raise error if a comment is sent with count command
- Backlog
- is related to
-
SERVER-29794 Adding a comment to all commands
- Closed
-
SERVER-44847 Clean up explicit 'comment' fields name attached to distinct and count commands in IDL files
- Closed