[SERVER-29794] Adding a comment to all commands Created: 22/Jun/17 Updated: 30/Oct/23 Resolved: 24/Sep/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Logging |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1 |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | James Phelan (Inactive) | Assignee: | Arun Banala |
| Resolution: | Fixed | Votes: | 5 |
| Labels: | storch | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Query 2019-07-29, Query 2019-08-12, Query 2019-08-26, Query 2019-09-09, Query 2019-09-23, Query 2019-10-07 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 46 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
The following proposed feature request would allow comments to be added to bulk operations. The comment should behave similar to cursor.comment(). The requested functionality is as follows:
|
| Comments |
| Comment by David Bartley [ 10/Oct/20 ] | ||||
|
| ||||
| Comment by David Storch [ 09/Oct/20 ] | ||||
|
Hi bartle! Due to the complexity of the changes in this patch and the upgrade/downgrade implications, I'd be reluctant to attempt a backport of this improvement to 4.2 and earlier. There are upgrade/downgrade implications because older versions may reject commands with a comment field, causing commands sent between nodes in the cluster during an upgrade or downgrade to fail. We are using featureCompatibilityVersion ensure that the comment parameter is only fully available once the featureCompatibilityVersion is set to "4.4". I think by backporting this to 4.2.x, for example, we could break the minor version upgrade from 4.2.(x-1) to 4.2.x. See linked ticket | ||||
| Comment by David Bartley [ 06/Oct/20 ] | ||||
|
Would it be possible to backport this to 4.2, 4.0. and 3.6? | ||||
| Comment by Arun Banala [ 14/Jul/20 ] | ||||
|
jeff.yemin Yes, the comment can be any BSON value. | ||||
| Comment by Jeffrey Yemin [ 14/Jul/20 ] | ||||
|
arun.banala can the comment be any BSON value, or only string or document? e.g. is this allowed:
| ||||
| Comment by Githook User [ 25/Sep/19 ] | ||||
|
Author: {'name': 'Arun Banala', 'username': 'banarun', 'email': 'arun.banala@10gen.com'}Message: | ||||
| Comment by David Bartley [ 25/Sep/19 ] | ||||
|
Thanks, that's great! | ||||
| Comment by Arun Banala [ 24/Sep/19 ] | ||||
|
bartle, james.phelan: This feature is now implemented. The 'comment' field can now be attached as a top level field to any command. The 'comment' attached to a command will be visible on system.profile, $currentOp and logs for the corresponding command. Additionally, a comment attached to 'find' or 'aggregate' would appear on system.profile, $currentOp and logs of the corresponding 'getMore' request. | ||||
| Comment by Githook User [ 24/Sep/19 ] | ||||
|
Author: {'username': 'banarun', 'email': 'arun.banala@10gen.com', 'name': 'Arun Banala'}Message: | ||||
| Comment by David Bartley [ 22/Mar/19 ] | ||||
|
Any update on this? More specifically, is there any reason not to just allow "comment" as a top-level field on every command? We include various metadata in the comment (tracing information, caller information/stack frame), so it's rather convenient to have that available on all commands in a uniform and consistent manner. The change itself should be straightforward; just add a "comment" entry in src/mongo/db/command_generic_argument.cpp. | ||||
| Comment by Ian Whalen (Inactive) [ 23/Jun/17 ] | ||||
|
Expanding the scope of this ticket to cover all CRUD commands. |