From b2cfe4aed88f2a1232f952196140d06509677be7 Mon Sep 17 00:00:00 2001 From: Jack Mulrow Date: Fri, 11 Mar 2022 15:59:56 +0000 Subject: SERVER-64407 Add ResourceYielder support to ARS --- src/mongo/s/async_requests_sender.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/mongo/s/async_requests_sender.h') diff --git a/src/mongo/s/async_requests_sender.h b/src/mongo/s/async_requests_sender.h index 3e14bec56d3..432227356cc 100644 --- a/src/mongo/s/async_requests_sender.h +++ b/src/mongo/s/async_requests_sender.h @@ -36,6 +36,7 @@ #include "mongo/bson/bsonobj.h" #include "mongo/client/read_preference.h" #include "mongo/db/baton.h" +#include "mongo/db/resource_yielder.h" #include "mongo/executor/remote_command_response.h" #include "mongo/executor/scoped_task_executor.h" #include "mongo/executor/task_executor.h" @@ -135,7 +136,8 @@ public: StringData dbName, const std::vector& requests, const ReadPreferenceSetting& readPreference, - Shard::RetryPolicy retryPolicy); + Shard::RetryPolicy retryPolicy, + std::unique_ptr resourceYielder); /** * Returns true if responses for all requests have been returned via next(). @@ -294,6 +296,10 @@ private: // Scoped baton holder which ensures any callbacks which touch this ARS are called with a // not-okay status (or not run, in the case of ExecutorFuture continuations). Baton::SubBatonHolder _subBaton; + + // Interface for yielding and unyielding resources while waiting on results from the network. + // Null if yielding isn't necessary. + std::unique_ptr _resourceYielder; }; } // namespace mongo -- cgit v1.2.1