When a legacy query is issued to a mongos with a $comment meta-operator attached, the comment will be dropped before the query is forwarded. This is because the query is transformed to a find command for the shards, but the $comment field is not parsed from the original legacy object and is therefore not added to the final command. A legacy query on a mongod retains the comment since no transformation occurs. This behaviour has been present since 3.2.
- is related to
-
SERVER-33716 $comment is internally converted to a string
- Closed
- links to