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

choosing query field in system.profile

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.6.8
    • Component/s: Shell
    • None
    • ALL
    • Hide

      db.coll.setProfilingLevel(2)
      db.system.profile.find({query: {$exists:1}})
      db.system.profile.find({query: {$exists:1}}).count()

      Show
      db.coll.setProfilingLevel(2) db.system.profile.find({query: {$exists:1}}) db.system.profile.find({query: {$exists:1}}).count()

      in a database where profiling is activated, if I query the existence of query attribute in system.profile it will get the following error:
      error:

      { "$err" : "Can't canonicalize query: BadValue unknown top level operator: $exists", "code" : 17287 }

      but if I add .count() to the end of this query, I will receive the number of such documents.

            Assignee:
            Unassigned Unassigned
            Reporter:
            paam Parinaz Ameri
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: