diff options
author | Waley Chen <waleycz@gmail.com> | 2016-05-02 18:28:51 -0400 |
---|---|---|
committer | Waley Chen <waleycz@gmail.com> | 2016-05-02 18:28:51 -0400 |
commit | 7f8861fbb04b9188e793f762fe2cfc01266fcf30 (patch) | |
tree | 32b57e6eb86a643656f1ea1792637423d3cc5586 /src/mongo/db/query | |
parent | da38826985001daff55c7e2f723f73f5263e2dbf (diff) | |
download | mongo-7f8861fbb04b9188e793f762fe2cfc01266fcf30.tar.gz |
Revert "SERVER-23243 Replace Listener::getElapsedTimeMillis() in elapsed_tracker.cpp"
This reverts commit da38826985001daff55c7e2f723f73f5263e2dbf.
Diffstat (limited to 'src/mongo/db/query')
-rw-r--r-- | src/mongo/db/query/plan_yield_policy.cpp | 14 | ||||
-rw-r--r-- | src/mongo/db/query/plan_yield_policy.h | 7 |
2 files changed, 1 insertions, 20 deletions
diff --git a/src/mongo/db/query/plan_yield_policy.cpp b/src/mongo/db/query/plan_yield_policy.cpp index 575ebf664b8..b03ec44920b 100644 --- a/src/mongo/db/query/plan_yield_policy.cpp +++ b/src/mongo/db/query/plan_yield_policy.cpp @@ -35,28 +35,16 @@ #include "mongo/db/operation_context.h" #include "mongo/db/query/query_knobs.h" #include "mongo/db/query/query_yield.h" -#include "mongo/db/service_context.h" #include "mongo/util/scopeguard.h" -#include "mongo/util/time_support.h" namespace mongo { PlanYieldPolicy::PlanYieldPolicy(PlanExecutor* exec, PlanExecutor::YieldPolicy policy) : _policy(policy), _forceYield(false), - _elapsedTracker(exec->getOpCtx()->getServiceContext()->getFastClockSource(), - internalQueryExecYieldIterations, - Milliseconds(internalQueryExecYieldPeriodMS)), + _elapsedTracker(internalQueryExecYieldIterations, internalQueryExecYieldPeriodMS), _planYielding(exec) {} - -PlanYieldPolicy::PlanYieldPolicy(PlanExecutor::YieldPolicy policy, ClockSource* cs) - : _policy(policy), - _forceYield(false), - _elapsedTracker( - cs, internalQueryExecYieldIterations, Milliseconds(internalQueryExecYieldPeriodMS)), - _planYielding(nullptr) {} - bool PlanYieldPolicy::shouldYield() { if (!allowedToYield()) return false; diff --git a/src/mongo/db/query/plan_yield_policy.h b/src/mongo/db/query/plan_yield_policy.h index ec6dca7a0f2..0de47c608cd 100644 --- a/src/mongo/db/query/plan_yield_policy.h +++ b/src/mongo/db/query/plan_yield_policy.h @@ -34,7 +34,6 @@ namespace mongo { -class ClockSource; class RecordFetcher; class PlanYieldPolicy { @@ -45,12 +44,6 @@ public: * locks. */ PlanYieldPolicy(PlanExecutor* exec, PlanExecutor::YieldPolicy policy); - /** - * Only used in dbtests since we don't have access to a PlanExecutor. Since we don't have - * access to the PlanExecutor to grab a ClockSource from, we pass in a ClockSource directly - * in the constructor instead. - */ - PlanYieldPolicy(PlanExecutor::YieldPolicy policy, ClockSource* cs); /** * Used by YIELD_AUTO plan executors in order to check whether it is time to yield. |