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

Include IntervalEvaluationTrees in string debug output for 'IndexScanNode' in a QuerySolution tree

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • QE 2023-04-17

    Description

      This is just a small improvement to make the server's debug logs more useful. In particular it can be helpful if you are looking at logLevel 5 output from the "query" log component. I introduced this change for a separate debugging task I was working on, but it seems worth introducing into the code base. Here's the patch:

      diff --git a/src/mongo/db/query/query_solution.cpp b/src/mongo/db/query/query_solution.cpp
      index 0916ef9b1be..511598825fd 100644
      --- a/src/mongo/db/query/query_solution.cpp
      +++ b/src/mongo/db/query/query_solution.cpp
      @@ -652,6 +652,10 @@ void IndexScanNode::appendToString(str::stream* ss, int indent) const {
           *ss << "direction = " << direction << '\n';
           addIndent(ss, indent + 1);
           *ss << "bounds = " << bounds.toString(index.collator != nullptr) << '\n';
      +    if (!iets.empty()) {
      +        addIndent(ss, indent + 1);
      +        *ss << "iets = " << ietsToString(index, iets) << '\n';
      +    }
           addCommon(ss, indent);
       }
      
      

      Attachments

        Activity

          People

            david.storch@mongodb.com David Storch
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: