[SERVER-75425] Include IntervalEvaluationTrees in string debug output for 'IndexScanNode' in a QuerySolution tree Created: 28/Mar/23  Updated: 29/Oct/23  Resolved: 03/Apr/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc0

Type: Improvement Priority: Major - P3
Reporter: David Storch Assignee: David Storch
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: QE 2023-04-17
Participants:

 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);
 }



 Comments   
Comment by Githook User [ 03/Apr/23 ]

Author:

{'name': 'David Storch', 'email': 'david.storch@mongodb.com', 'username': 'dstorch'}

Message: SERVER-75425 Include IETs in IndexScanNode debug print output
Branch: master
https://github.com/mongodb/mongo/commit/3e855d6995eab89df943d24c80622ad793bc7319

Generated at Thu Feb 08 06:30:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.