diff options
author | Misha Tyulenev <misha@mongodb.com> | 2017-07-19 15:10:51 -0400 |
---|---|---|
committer | Misha Tyulenev <misha@mongodb.com> | 2017-07-19 17:19:56 -0400 |
commit | e034bdc4be7de0326d34e982febf00505cf0d993 (patch) | |
tree | 7cb5dfd3c03194bb3e811f7e6eb6552b28373888 /src/mongo/executor | |
parent | ce1dbc96feb5ba8bf7f60cacdea1ddc77a1a5556 (diff) | |
download | mongo-e034bdc4be7de0326d34e982febf00505cf0d993.tar.gz |
SERVER-29700 add operationTime in all connections used by mongos
Diffstat (limited to 'src/mongo/executor')
-rw-r--r-- | src/mongo/executor/network_interface_asio_command.cpp | 1 | ||||
-rw-r--r-- | src/mongo/executor/network_interface_asio_test.cpp | 4 | ||||
-rw-r--r-- | src/mongo/executor/network_interface_mock.cpp | 4 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/mongo/executor/network_interface_asio_command.cpp b/src/mongo/executor/network_interface_asio_command.cpp index 674539146ca..2799c350257 100644 --- a/src/mongo/executor/network_interface_asio_command.cpp +++ b/src/mongo/executor/network_interface_asio_command.cpp @@ -160,6 +160,7 @@ ResponseStatus decodeRPC(Message* received, if (metadataHook) { auto listenStatus = callNoexcept(*metadataHook, &rpc::EgressMetadataHook::readReplyMetadata, + nullptr, // adding operationTime is handled via lambda source.toString(), replyMetadata); if (!listenStatus.isOK()) { diff --git a/src/mongo/executor/network_interface_asio_test.cpp b/src/mongo/executor/network_interface_asio_test.cpp index 0d353728df0..bd751297f4c 100644 --- a/src/mongo/executor/network_interface_asio_test.cpp +++ b/src/mongo/executor/network_interface_asio_test.cpp @@ -1001,7 +1001,9 @@ public: return Status::OK(); } - Status readReplyMetadata(StringData replySource, const BSONObj& metadataObj) override { + Status readReplyMetadata(OperationContext* opCtx, + StringData replySource, + const BSONObj& metadataObj) override { *_gotReplyMetadata = (metadataObj["baz"].str() == "garply"); return Status::OK(); } diff --git a/src/mongo/executor/network_interface_mock.cpp b/src/mongo/executor/network_interface_mock.cpp index 32dd7f49e3d..048aa895f2f 100644 --- a/src/mongo/executor/network_interface_mock.cpp +++ b/src/mongo/executor/network_interface_mock.cpp @@ -308,7 +308,9 @@ void NetworkInterfaceMock::scheduleResponse(NetworkOperationIterator noi, // If no RemoteCommandResponse was returned (for example, on a simulated network error), then // do not attempt to run the metadata hook, since there is no returned metadata. if (_metadataHook && response.isOK()) { - _metadataHook->readReplyMetadata(noi->getRequest().target.toString(), response.metadata) + _metadataHook + ->readReplyMetadata( + noi->getRequest().opCtx, noi->getRequest().target.toString(), response.metadata) .transitional_ignore(); } |