diff options
Diffstat (limited to 'src/mongo/db/s/sharding_ddl_util.cpp')
-rw-r--r-- | src/mongo/db/s/sharding_ddl_util.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mongo/db/s/sharding_ddl_util.cpp b/src/mongo/db/s/sharding_ddl_util.cpp index 3154339e52c..2d4dc68a02b 100644 --- a/src/mongo/db/s/sharding_ddl_util.cpp +++ b/src/mongo/db/s/sharding_ddl_util.cpp @@ -160,11 +160,12 @@ void linearizeCSRSReads(OperationContext* opCtx) { ShardingCatalogClient::kMajorityWriteConcern)); } -void sendAuthenticatedCommandToShards(OperationContext* opCtx, - StringData dbName, - const BSONObj& command, - const std::vector<ShardId>& shardIds, - const std::shared_ptr<executor::TaskExecutor>& executor) { +std::vector<AsyncRequestsSender::Response> sendAuthenticatedCommandToShards( + OperationContext* opCtx, + StringData dbName, + const BSONObj& command, + const std::vector<ShardId>& shardIds, + const std::shared_ptr<executor::TaskExecutor>& executor) { // TODO SERVER-57519: remove the following scope { // Ensure ShardRegistry is initialized before using the AsyncRequestsSender that relies on @@ -180,7 +181,8 @@ void sendAuthenticatedCommandToShards(OperationContext* opCtx, BSONObjBuilder bob(command); rpc::writeAuthDataToImpersonatedUserMetadata(opCtx, &bob); auto authenticatedCommand = bob.obj(); - sharding_util::sendCommandToShards(opCtx, dbName, authenticatedCommand, shardIds, executor); + return sharding_util::sendCommandToShards( + opCtx, dbName, authenticatedCommand, shardIds, executor); } void removeTagsMetadataFromConfig(OperationContext* opCtx, |