diff options
author | Alex Taskov <alex.taskov@mongodb.com> | 2020-08-28 09:12:15 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-28 14:10:24 +0000 |
commit | 7d915a65b286e535397a5d79bf2109512003bda9 (patch) | |
tree | 79a98d26851b43e9f3075b669cd0f9ba1b4cad5a /src/mongo/db/pipeline/pipeline_d.cpp | |
parent | 0c52e9773275d0c4a11c77e56d5ea0f914a903be (diff) | |
download | mongo-7d915a65b286e535397a5d79bf2109512003bda9.tar.gz |
SERVER-49895 Expose getLatestOplogTimestamp() in aggregation cursor command responses on oplog
Diffstat (limited to 'src/mongo/db/pipeline/pipeline_d.cpp')
-rw-r--r-- | src/mongo/db/pipeline/pipeline_d.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/pipeline_d.cpp b/src/mongo/db/pipeline/pipeline_d.cpp index 647380368db..f6cbf689508 100644 --- a/src/mongo/db/pipeline/pipeline_d.cpp +++ b/src/mongo/db/pipeline/pipeline_d.cpp @@ -659,6 +659,11 @@ StatusWith<std::unique_ptr<PlanExecutor, PlanExecutor::Deleter>> PipelineD::prep QueryPlannerParams::ASSERT_MIN_TS_HAS_NOT_FALLEN_OFF_OPLOG); } + // The aggregate command's $_requestResumeToken parameter can only be used for the oplog. + if (aggRequest && aggRequest->getRequestResumeToken()) { + plannerOpts |= QueryPlannerParams::TRACK_LATEST_OPLOG_TS; + } + // If there is a sort stage eligible for pushdown, serialize its SortPattern to a BSONObj. The // BSONObj format is currently necessary to request that the sort is computed by the query layer // inside the inner PlanExecutor. We also remove the $sort stage from the Pipeline, since it |