summaryrefslogtreecommitdiff
path: root/src/mongo/db/query
diff options
context:
space:
mode:
authorXiangyu Yao <xiangyu.yao@mongodb.com>2019-07-10 18:38:03 -0400
committerXiangyu Yao <xiangyu.yao@mongodb.com>2019-07-10 18:38:03 -0400
commitcb3b6c8b2a28190560906db4d78ef833eec44425 (patch)
tree8f550393c99b15f4b27d9bbb27115fc451930be7 /src/mongo/db/query
parenta4ef14ef41f0700ef07e5b57b0345d2396a44604 (diff)
downloadmongo-cb3b6c8b2a28190560906db4d78ef833eec44425.tar.gz
Revert "SERVER-40755 Expose statistics which indicate how many collection scans have executed"
This reverts commit a4ef14ef41f0700ef07e5b57b0345d2396a44604.
Diffstat (limited to 'src/mongo/db/query')
-rw-r--r--src/mongo/db/query/explain.cpp8
-rw-r--r--src/mongo/db/query/find.cpp2
-rw-r--r--src/mongo/db/query/plan_summary_stats.h8
3 files changed, 1 insertions, 17 deletions
diff --git a/src/mongo/db/query/explain.cpp b/src/mongo/db/query/explain.cpp
index eb109928be4..709d8ffda4a 100644
--- a/src/mongo/db/query/explain.cpp
+++ b/src/mongo/db/query/explain.cpp
@@ -34,7 +34,6 @@
#include "mongo/base/owned_pointer_vector.h"
#include "mongo/bson/util/builder.h"
#include "mongo/db/exec/cached_plan.h"
-#include "mongo/db/exec/collection_scan.h"
#include "mongo/db/exec/count_scan.h"
#include "mongo/db/exec/distinct_scan.h"
#include "mongo/db/exec/idhack.h"
@@ -1016,13 +1015,6 @@ void Explain::getSummaryStats(const PlanExecutor& exec, PlanSummaryStats* statsO
statsOut->replanned = cachedStats->replanned;
} else if (STAGE_MULTI_PLAN == stages[i]->stageType()) {
statsOut->fromMultiPlanner = true;
- } else if (STAGE_COLLSCAN == stages[i]->stageType()) {
- statsOut->collectionScans++;
- const auto collScan = static_cast<const CollectionScan*>(stages[i]);
- const auto collScanStats =
- static_cast<const CollectionScanStats*>(collScan->getSpecificStats());
- if (!collScanStats->tailable)
- statsOut->collectionScansNonTailable++;
}
}
}
diff --git a/src/mongo/db/query/find.cpp b/src/mongo/db/query/find.cpp
index f9de0152b5c..8f4132b1eaf 100644
--- a/src/mongo/db/query/find.cpp
+++ b/src/mongo/db/query/find.cpp
@@ -150,7 +150,7 @@ void endQueryOp(OperationContext* opCtx,
curOp->debug().setPlanSummaryMetrics(summaryStats);
if (collection) {
- collection->infoCache()->notifyOfQuery(opCtx, summaryStats);
+ collection->infoCache()->notifyOfQuery(opCtx, summaryStats.indexesUsed);
}
if (curOp->shouldDBProfile()) {
diff --git a/src/mongo/db/query/plan_summary_stats.h b/src/mongo/db/query/plan_summary_stats.h
index a0ded1f2755..35deb4d83c0 100644
--- a/src/mongo/db/query/plan_summary_stats.h
+++ b/src/mongo/db/query/plan_summary_stats.h
@@ -50,14 +50,6 @@ struct PlanSummaryStats {
// The number of milliseconds spent inside the root stage's work() method.
long long executionTimeMillis = 0;
- // The number of collection scans that occur during execution. Note that more than one
- // collection scan may happen during execution (e.g. for $lookup execution).
- long long collectionScans = 0;
-
- // The number of collection scans that occur during execution which are nontailable. Note that
- // more than one collection scan may happen during execution (e.g. for $lookup execution).
- long long collectionScansNonTailable = 0;
-
// Did this plan use an in-memory sort stage?
bool hasSortStage = false;