diff options
Diffstat (limited to 'src/mongo/s/query/cluster_aggregate.cpp')
-rw-r--r-- | src/mongo/s/query/cluster_aggregate.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/s/query/cluster_aggregate.cpp b/src/mongo/s/query/cluster_aggregate.cpp index 4bcd150206b..b3df71582da 100644 --- a/src/mongo/s/query/cluster_aggregate.cpp +++ b/src/mongo/s/query/cluster_aggregate.cpp @@ -133,6 +133,14 @@ boost::intrusive_ptr<ExpressionContext> makeExpressionContext( mergeCtx->inMongos = true; + // If the request specified v2 resume tokens for change streams, set this on the expCtx. On 6.0 + // we only expect this to occur during testing. + // TODO SERVER-65370: after 6.0, assume true unless present and explicitly false. + if (request.getGenerateV2ResumeTokens()) { + uassert(6528201, "Invalid request for v2 resume tokens", getTestCommandsEnabled()); + mergeCtx->changeStreamTokenVersion = 2; + } + // Serialize the 'AggregateCommandRequest' and save it so that the original command can be // reconstructed for dispatch to a new shard, which is sometimes necessary for change streams // pipelines. |