|
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});
|
|