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

Log query options

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Querying
    • None
    • Fully Compatible

    Description

      The options specified for a query can alter server behaviour in important ways, but these options are not recorded in log lines. It would be useful if they could be included (even just numerically), eg:

      rs.slaveOk()
      db.test.find().addOption(DBQuery.Option.noTimeout)
      

      results in

      -2015-08-17T15:40:38.088+1000 I QUERY    [conn3] query test.test planSummary: COLLSCAN cursorid:30655346326 ntoreturn:0 ntoskip:0 nscanned:0 nscannedObjects:101 keyUpdates:0 writeConflicts:0 numYields:0 nreturned:101 reslen:2242 locks:{ Global: { acquireCount: { r: 2 } }, MMAPV1Journal: { acquireCount: { r: 1 } }, Database: { acquireCount: { r: 1 } }, Collection: { acquireCount: { R: 1 } } } 0ms
      +2015-08-17T15:40:38.088+1000 I QUERY    [conn3] query test.test planSummary: COLLSCAN options:20 cursorid:30655346326 ntoreturn:0 ntoskip:0 nscanned:0 nscannedObjects:101 keyUpdates:0 writeConflicts:0 numYields:0 nreturned:101 reslen:2242 locks:{ Global: { acquireCount: { r: 2 } }, MMAPV1Journal: { acquireCount: { r: 1 } }, Database: { acquireCount: { r: 1 } }, Collection: { acquireCount: { R: 1 } } } 0ms
      

      or

      -2015-08-17T15:40:38.088+1000 I QUERY    [conn3] query test.test planSummary: COLLSCAN cursorid:30655346326 ntoreturn:0 ntoskip:0 nscanned:0 nscannedObjects:101 keyUpdates:0 writeConflicts:0 numYields:0 nreturned:101 reslen:2242 locks:{ Global: { acquireCount: { r: 2 } }, MMAPV1Journal: { acquireCount: { r: 1 } }, Database: { acquireCount: { r: 1 } }, Collection: { acquireCount: { R: 1 } } } 0ms
      +2015-08-17T15:40:38.088+1000 I QUERY    [conn3] query test.test planSummary: COLLSCAN options:20(slaveOk,noTimeout) cursorid:30655346326 ntoreturn:0 ntoskip:0 nscanned:0 nscannedObjects:101 keyUpdates:0 writeConflicts:0 numYields:0 nreturned:101 reslen:2242 locks:{ Global: { acquireCount: { r: 2 } }, MMAPV1Journal: { acquireCount: { r: 1 } }, Database: { acquireCount: { r: 1 } }, Collection: { acquireCount: { R: 1 } } } 0ms
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: