• Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Fully Compatible

      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

      Unable to find source-code formatter for language: diff. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      -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

      Unable to find source-code formatter for language: diff. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      -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
      

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

              Created:
              Updated:
              Resolved: