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

Hash query shapes when logging

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.4.7, 3.5.12
    • Component/s: Logging, Querying
    • Labels:
      None
    • Query

      1. Especially long queries are truncated in the mongod log file.
      2. Parsing the shape of queries from a log line is difficult.

      I propose two improvements.

      1. Always print a hash of the query shape. This eliminates the issue of #1 as we can now group queries by hash. This also will speed log analysis, eliminating the need to parse the query.
      2. Add an administrative command to return a query shape from a hash in the plan cache.

      Not only would this speed analysis of slow queries but would be helpful with log redaction. The analysis can be performed on just the hash with the associated metadata and the customer can investigate the actual queries independently.

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            kevin.arhelger@mongodb.com Kevin Arhelger
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: