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

Log redaction does not show planSummary when slow queries are logged

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.4.14, 4.0.0
    • 3.4.17, 3.6.8, 4.0.2, 4.1.3
    • Logging, Security
    • None
    • Fully Compatible
    • ALL
    • v4.0, v3.6, v3.4

    Description

      At present when log redaction is enabled, the planSummary section of the log message (if it's a for a slow query) gets redacted completely:

      2018-08-07T12:10:40.348+1000 I COMMAND  [conn11] command test.t appName: "MongoDB Shell" command: find { find: "###", filter: { a: "###", b: "###" }, $db: "###" } planSummary: ### keysExamined:1 docsExamined:1 cursorExhausted:1 numYields:0 nreturned:1 reslen:138 locks:{ Global: { acquireCount: { r: 1 } }, Database: { acquireCount: { r: 1 } }, Collection: { acquireCount: { r: 1 } } } protocol:op_msg 19ms
      

      That makes it difficult to understand why a query is perfoming the way it is. It should not be necessary to have planSummary redacted completely. The redaction should only happen for sensitive elements (just as we do it for the query shape), if they happen to appear under planSummary.

      This is the un-redacted message that shows that there is nothing sensitive under planSummary in this particular example:

      2018-08-07T12:11:02.992+1000 I COMMAND  [conn11] command test.t appName: "MongoDB Shell" command: find { find: "t", filter: { a: "a", b: "b" }, $db: "test" } planSummary: IXSCAN { a: 1, b: 1 } keysExamined:1 docsExamined:1 cursorExhausted:1 numYields:0 nreturned:1 reslen:138 locks:{ Global: { acquireCount: { r: 1 } }, Database: { acquireCount: { r: 1 } }, Collection: { acquireCount: { r: 1 } } } protocol:op_msg 0ms
      

      Attachments

        Activity

          People

            kelsey.schubert@mongodb.com Kelsey T Schubert
            dmitry.ryabtsev@mongodb.com Dmitry Ryabtsev
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: