currentOp command request object format should include "filter", "includeInactive" options

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Admin, Diagnostics
    • None
    • Query
    • None
    • None
    • None
    • None
    • None
    • None
    • None

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

            Assignee:
            Backlog - Query Team (Inactive)
            Reporter:
            J Rassi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: