diff options
author | Spencer Jackson <spencer.jackson@mongodb.com> | 2017-12-14 14:32:18 -0500 |
---|---|---|
committer | Spencer Jackson <spencer.jackson@mongodb.com> | 2017-12-14 14:32:18 -0500 |
commit | 1f38fb202b9f8696cf28d39e674242e036c0b75c (patch) | |
tree | 249a9c923a97dd7e37d8898c3782bd27a6dd53a3 /src/mongo/db/query/plan_executor.h | |
parent | 47247293f18ea581954f6fcf4c0018b7828e3c3a (diff) | |
download | mongo-1f38fb202b9f8696cf28d39e674242e036c0b75c.tar.gz |
Revert "SERVER-31684 Fix unexpected "operation exceeded time limit" errors"
This reverts commit b79e5f04ffc79b5892f89c22b9e5f26a297b1185.
Diffstat (limited to 'src/mongo/db/query/plan_executor.h')
-rw-r--r-- | src/mongo/db/query/plan_executor.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mongo/db/query/plan_executor.h b/src/mongo/db/query/plan_executor.h index 3de96faf96b..aeed2ea8154 100644 --- a/src/mongo/db/query/plan_executor.h +++ b/src/mongo/db/query/plan_executor.h @@ -53,6 +53,13 @@ struct PlanStageStats; class WorkingSet; /** + * If true, when no results are available from a plan, then instead of returning immediately, the + * system should wait up to the length of the operation deadline for data to be inserted which + * causes results to become available. + */ +extern const OperationContext::Decoration<bool> shouldWaitForInserts; + +/** * If a getMore command specified a lastKnownCommittedOpTime (as secondaries do), we want to stop * waiting for new data as soon as the committed op time changes. * @@ -533,6 +540,14 @@ private: */ Status pickBestPlan(const Collection* collection); + /** + * Given a non-OK status returned from a yield 'yieldError', checks if this PlanExecutor + * represents a tailable, awaitData cursor and whether 'yieldError' is the error object + * describing an operation time out. If so, returns IS_EOF. Otherwise returns DEAD, and + * populates 'errorObj' with the error - if 'errorObj' is not null. + */ + ExecState swallowTimeoutIfAwaitData(Status yieldError, Snapshotted<BSONObj>* errorObj) const; + // The OperationContext that we're executing within. This can be updated if necessary by using // detachFromOperationContext() and reattachToOperationContext(). OperationContext* _opCtx; |