summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp')
-rw-r--r--src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp b/src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp
index 6f17c7a0121..fb0890f5d61 100644
--- a/src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp
+++ b/src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp
@@ -99,6 +99,12 @@ bool supportsUniqueKey(const boost::intrusive_ptr<ExpressionContext>& expCtx,
} // namespace
+std::unique_ptr<MongoProcessInterface::WriteSizeEstimator>
+MongosProcessInterface::getWriteSizeEstimator(OperationContext* opCtx,
+ const NamespaceString& ns) const {
+ return std::make_unique<TargetPrimaryWriteSizeEstimator>();
+}
+
std::unique_ptr<Pipeline, PipelineDeleter> MongosProcessInterface::attachCursorSourceToPipeline(
Pipeline* ownedPipeline,
ShardTargetingPolicy shardTargetingPolicy,
@@ -175,8 +181,15 @@ boost::optional<Document> MongosProcessInterface::lookupSingleDocument(
// single shard will be targeted here; however, in certain cases where only the _id
// is present, we may need to scatter-gather the query to all shards in order to
// find the document.
- auto requests = getVersionedRequestsForTargetedShards(
- expCtx->opCtx, nss, cm, findCmd, filterObj, CollationSpec::kSimpleSpec);
+ auto requests =
+ getVersionedRequestsForTargetedShards(expCtx->opCtx,
+ nss,
+ cm,
+ findCmd,
+ filterObj,
+ CollationSpec::kSimpleSpec,
+ boost::none /*letParameters*/,
+ boost::none /*runtimeConstants*/);
// Dispatch the requests. The 'establishCursors' method conveniently prepares the
// result into a vector of cursor responses for us.