Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-18612

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Admin, Diagnostics
    • None
    • Query

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

      Attachments

        Activity

          People

            backlog-server-query Backlog - Query Team (Inactive)
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: