summaryrefslogtreecommitdiff
path: root/src/mongo/s/client/sharding_connection_hook.cpp
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2017-03-09 10:54:04 -0500
committerRandolph Tan <randolph@10gen.com>2017-03-10 13:11:07 -0500
commita067d77c06242aed80ccbf9e6d03b6a054849ffa (patch)
treeb94ac2388db6989316893a82d0e361420e800ec3 /src/mongo/s/client/sharding_connection_hook.cpp
parentd2c44fd6ccdeab0590f8fe2413c84c2467f2b60e (diff)
downloadmongo-a067d77c06242aed80ccbf9e6d03b6a054849ffa.tar.gz
Revert "Revert "SERVER-27750 Attach LogicalTimeMetadata to globalConnPool and shardConnectionPool""
This reverts commit 4e2cb91ed1fe8a9a8caead72a7f0bd56b2ba28d1.
Diffstat (limited to 'src/mongo/s/client/sharding_connection_hook.cpp')
-rw-r--r--src/mongo/s/client/sharding_connection_hook.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mongo/s/client/sharding_connection_hook.cpp b/src/mongo/s/client/sharding_connection_hook.cpp
index 36cb24bf9fc..057a9de1c4d 100644
--- a/src/mongo/s/client/sharding_connection_hook.cpp
+++ b/src/mongo/s/client/sharding_connection_hook.cpp
@@ -48,8 +48,8 @@ namespace mongo {
using std::string;
-ShardingConnectionHook::ShardingConnectionHook(
- bool shardedConnections, std::unique_ptr<rpc::ShardingEgressMetadataHook> egressHook)
+ShardingConnectionHook::ShardingConnectionHook(bool shardedConnections,
+ std::unique_ptr<rpc::EgressMetadataHook> egressHook)
: _shardedConnections(shardedConnections), _egressHook(std::move(egressHook)) {}
void ShardingConnectionHook::onCreate(DBClientBase* conn) {
@@ -77,11 +77,9 @@ void ShardingConnectionHook::onCreate(DBClientBase* conn) {
return _egressHook->readReplyMetadata(target, metadataObj);
});
}
- conn->setRequestMetadataWriter(
- [this](OperationContext* opCtx, BSONObjBuilder* metadataBob, StringData hostStringData) {
- return _egressHook->writeRequestMetadata(
- _shardedConnections, opCtx, hostStringData, metadataBob);
- });
+ conn->setRequestMetadataWriter([this](OperationContext* opCtx, BSONObjBuilder* metadataBob) {
+ return _egressHook->writeRequestMetadata(opCtx, metadataBob);
+ });
if (conn->type() == ConnectionString::MASTER) {