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

choosing query field in system.profile

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.6.8
    • 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()

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: