summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_change_stream_handle_topology_change.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/pipeline/document_source_change_stream_handle_topology_change.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source_change_stream_handle_topology_change.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/document_source_change_stream_handle_topology_change.cpp b/src/mongo/db/pipeline/document_source_change_stream_handle_topology_change.cpp
index 28b695c89be..95f59ee5794 100644
--- a/src/mongo/db/pipeline/document_source_change_stream_handle_topology_change.cpp
+++ b/src/mongo/db/pipeline/document_source_change_stream_handle_topology_change.cpp
@@ -210,9 +210,14 @@ BSONObj DocumentSourceChangeStreamHandleTopologyChange::createUpdatedCommandForN
auto* opCtx = pExpCtx->opCtx;
bool apiStrict = APIParameters::get(opCtx).getAPIStrict().value_or(false);
+ tassert(7663502,
+ str::stream() << "SerializationContext on the expCtx should not be empty, with ns: "
+ << pExpCtx->ns.ns(),
+ pExpCtx->serializationCtxt != SerializationContext::stateDefault());
+
// Create the 'AggregateCommandRequest' object which will help in creating the parsed pipeline.
auto aggCmdRequest = aggregation_request_helper::parseFromBSON(
- opCtx, pExpCtx->ns, shardCommand, boost::none, apiStrict);
+ opCtx, pExpCtx->ns, shardCommand, boost::none, apiStrict, pExpCtx->serializationCtxt);
// Parse and optimize the pipeline.
auto pipeline = Pipeline::parse(aggCmdRequest.getPipeline(), pExpCtx);