-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
QE 2023-04-17
-
None
-
None
-
None
-
None
-
None
-
None
-
None
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);
}