diff options
author | Arun Banala <arun.banala@mongodb.com> | 2022-05-09 11:26:28 +0100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-05-09 13:14:09 +0000 |
commit | f7e9b07d14b42f237c454b3b4347d1419e85180c (patch) | |
tree | c4e529dcadac421ac6a0b320c0ab192733973160 /src/mongo/db/pipeline | |
parent | fe5eada742639e1e6937b45f2dcf2c5a6071ea0b (diff) | |
download | mongo-f7e9b07d14b42f237c454b3b4347d1419e85180c.tar.gz |
SERVER-66307 Set $_generateV2ResumeTokens parameter only on mongos
Diffstat (limited to 'src/mongo/db/pipeline')
-rw-r--r-- | src/mongo/db/pipeline/sharded_agg_helpers.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/sharded_agg_helpers.cpp b/src/mongo/db/pipeline/sharded_agg_helpers.cpp index 06514ac0276..7f41aeca2a2 100644 --- a/src/mongo/db/pipeline/sharded_agg_helpers.cpp +++ b/src/mongo/db/pipeline/sharded_agg_helpers.cpp @@ -56,6 +56,7 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/collection_uuid_mismatch.h" +#include "mongo/s/is_mongos.h" #include "mongo/s/query/cluster_query_knobs_gen.h" #include "mongo/s/query/document_source_merge_cursors.h" #include "mongo/s/query/establish_cursors.h" @@ -117,7 +118,7 @@ RemoteCursor openChangeStreamNewShardMonitor(const boost::intrusive_ptr<Expressi aggReq.setNeedsMerge(true); // TODO SERVER-65369: This code block can be removed after 7.0. - if (expCtx->inMongos && expCtx->changeStreamTokenVersion == 1) { + if (isMongos() && expCtx->changeStreamTokenVersion == 1) { // A request for v1 resume tokens on mongos should only be allowed in test mode. tassert(6497000, "Invalid request for v1 resume tokens", getTestCommandsEnabled()); aggReq.setGenerateV2ResumeTokens(false); |