[SERVER-28128] Add support for a "comment" parameter to the aggregate command Created: 27/Feb/17  Updated: 06/Sep/18  Resolved: 02/Aug/17

Status: Closed
Project: Core Server
Component/s: Aggregation Framework, Querying
Affects Version/s: None
Fix Version/s: 3.5.5

Type: Improvement Priority: Major - P3
Reporter: David Storch Assignee: Bernard Gorman
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Documented
is documented by DOCS-10020 Docs for SERVER-28128: Add support fo... Closed
Related
related to SERVER-36441 Don't truncate 'comment' command para... Backlog
is related to DRIVERS-377 Add support for a "comment" parameter... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v3.4
Sprint: Query 2017-03-27
Participants:

 Description   

In order to help users trace output in the logs, the system.profile collection, and db.currentOp() back to their application behavior, we should extend the aggregation command to accept a comment parameter:

db.runCommand({aggregate: "myCollection", pipeline: [{$match: "foo"}], comment: "fooMatch"});

We should require at command parsing time that the comment is a string. Its diagnostic display in the logs/profile/currentOp should be consistent with that for the find command's comment parameter, documented here.



 Comments   
Comment by Githook User [ 15/Mar/17 ]

Author:

{u'username': u'gormanb', u'name': u'Bernard Gorman', u'email': u'bernard.gorman@mongodb.com'}

Message: SERVER-28128 Add support for a "comment" parameter to the aggregate...
... command
Branch: master
https://github.com/mongodb/mongo/commit/1b98ea650d24ab1718bc1669729431ffaf066337

Comment by David Storch [ 27/Feb/17 ]

The likely implementation approach for this work would be adding parsing/serialization for the comment parameter to AggregationRequest. We also must ensure that a find command with a comment on a view is correctly rewritten to an aggregation command with the comment parameter preserved. Special care should be taken to ensure this works for find against a view routed through mongos in a sharded configuration.

Generated at Thu Feb 08 04:17:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.