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

Add query details to getmore entry in profiler and db.currentOp()

    XMLWordPrintableJSON

Details

    • Fully Compatible
    • Quint Iteration 4

    Description

      It is possible to run aggregation queries with the {cursor:{batchSize:0}} option, in order to quickly get back a cursor that can subsequently be iterated. This approach is documented here.
      The problem with using this option is that it makes debugging slow queries difficult since the database profiler (set to level 1) and mongod logs only record the 'getmore' ops on the cursor, since the original query is very fast.
      I think a couple of enhancements are needed :

      • add details of the query to the getmore log entry (which is essential for the above case)
      • add the details of the query to db.currentOp()
      • add the cursorId to the original query log entry (which makes correlating a query and its associated getmores much easier)

      Attachments

        Activity

          People

            david.storch@mongodb.com David Storch
            jon.rangel@mongodb.com Jon Rangel (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            14 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: