[SERVER-18612] currentOp command request object format should include "filter", "includeInactive" options Created: 21/May/15  Updated: 06/Dec/22  Resolved: 29/Apr/16

Status: Closed
Project: Core Server
Component/s: Admin, Diagnostics
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: J Rassi Assignee: Backlog - Query Team (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query
Participants:

 Description   

This ticket is a suggestion for a format change to the currentOp command request object. The interface would be more intuitive if the top-level predicates were scoped to a "filter" option, and the "$all" option (which shows inactive clients) was renamed to "includeInactive". The fact that $all is a valid query operator makes the format especially confusing (although, in the query predicate language, $all cannot be used as a top-level predicate, so the existing format is at least unambiguous).

To illustrate: the following is an example request in the existing format, which uses a filter object and the "$all" option:

db.adminCommand({currentOp: 1,
                 $or: [{client: /^127\./}, {secs_running: {$gt: 10}}],
                 $all: true,
                 connectionId: {$lt: 100}});

The same request in the suggested new format:

db.adminCommand({currentOp: 1,
                 filter: {$or: [{client: /^127\./}, {secs_running: {$gt: 10}],
                          connectionId: {$lt: 100}},
                 includeInactive: true});



 Comments   
Comment by J Rassi [ 29/Apr/16 ]

Closing as "Won't Fix". This would have been nice to have if it were fixed before the first version of the currentOp command shipped, but at this point there's not enough user benefit for schedulin this to be worth the effort of a command request format migration.

Generated at Thu Feb 08 03:48:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.