diff options
author | George Wangensteen <george.wangensteen@mongodb.com> | 2022-12-05 16:08:12 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-12-05 17:25:33 +0000 |
commit | c766dfeb3754db38c701aaf36711f6e7dff2737d (patch) | |
tree | 5b0fac2c8191635659299d6035a41eb0e5121568 /src/mongo/executor/async_rpc.h | |
parent | bd48632e88ef602c8a11162a5914eba39ee8662c (diff) | |
download | mongo-c766dfeb3754db38c701aaf36711f6e7dff2737d.tar.gz |
SERVER-71075 Add attempted/used targets to AsyncRPCErrorInfo
Diffstat (limited to 'src/mongo/executor/async_rpc.h')
-rw-r--r-- | src/mongo/executor/async_rpc.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/executor/async_rpc.h b/src/mongo/executor/async_rpc.h index 761bfbe8baa..86388866c1b 100644 --- a/src/mongo/executor/async_rpc.h +++ b/src/mongo/executor/async_rpc.h @@ -118,13 +118,14 @@ public: * Returns a RemoteCommandExecutionError with ErrorExtraInfo populated to contain * details about any error, local or remote, contained in `r`. */ -inline Status makeErrorIfNeeded(TaskExecutor::ResponseOnAnyStatus r) { +inline Status makeErrorIfNeeded(TaskExecutor::ResponseOnAnyStatus r, + std::vector<HostAndPort> targetsAttempted) { if (r.status.isOK() && getStatusFromCommandResult(r.data).isOK() && getWriteConcernStatusFromCommandResult(r.data).isOK() && getFirstWriteErrorStatusFromCommandResult(r.data).isOK()) { return Status::OK(); } - return {AsyncRPCErrorInfo(r), "Remote command execution failed"}; + return {AsyncRPCErrorInfo(r, targetsAttempted), "Remote command execution failed"}; } /** |