summaryrefslogtreecommitdiff
path: root/src/mongo/s/server.cpp
diff options
context:
space:
mode:
authorGregory Noma <gregory.noma@gmail.com>2020-02-11 14:39:18 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-14 19:59:50 +0000
commit5b09af74ef3791ae94bf1d8e7f1e29abb9e74ac3 (patch)
tree9deaf30425a564519ef38c5d482d23c75cf66c4a /src/mongo/s/server.cpp
parentfbb3d66a7fdc665c91351730a8fba067fbbbd905 (diff)
downloadmongo-5b09af74ef3791ae94bf1d8e7f1e29abb9e74ac3.tar.gz
SERVER-45966 Add ClientMetadataPropagationEgressHook for NetworkInterface used by ReplicaSetNodeProcessInterface
Diffstat (limited to 'src/mongo/s/server.cpp')
-rw-r--r--src/mongo/s/server.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/s/server.cpp b/src/mongo/s/server.cpp
index 1730281ad83..cddd8e36849 100644
--- a/src/mongo/s/server.cpp
+++ b/src/mongo/s/server.cpp
@@ -49,6 +49,7 @@
#include "mongo/db/auth/authz_manager_external_state_s.h"
#include "mongo/db/auth/user_cache_invalidator_job.h"
#include "mongo/db/client.h"
+#include "mongo/db/client_metadata_propagation_egress_hook.h"
#include "mongo/db/dbdirectclient.h"
#include "mongo/db/ftdc/ftdc_mongos.h"
#include "mongo/db/initialize_server_global_state.h"
@@ -424,6 +425,7 @@ Status initializeSharding(OperationContext* opCtx) {
std::make_unique<rpc::LogicalTimeMetadataHook>(opCtx->getServiceContext()));
hookList->addHook(
std::make_unique<rpc::CommittedOpTimeMetadataHook>(opCtx->getServiceContext()));
+ hookList->addHook(std::make_unique<rpc::ClientMetadataPropagationEgressHook>());
hookList->addHook(std::make_unique<rpc::ShardingEgressMetadataHookForMongos>(
opCtx->getServiceContext()));
return hookList;
@@ -559,6 +561,7 @@ ExitCode runMongosServer(ServiceContext* serviceContext) {
auto unshardedHookList = std::make_unique<rpc::EgressMetadataHookList>();
unshardedHookList->addHook(std::make_unique<rpc::LogicalTimeMetadataHook>(serviceContext));
+ unshardedHookList->addHook(std::make_unique<rpc::ClientMetadataPropagationEgressHook>());
unshardedHookList->addHook(
std::make_unique<rpc::ShardingEgressMetadataHookForMongos>(serviceContext));
// TODO SERVER-33053: readReplyMetadata is not called on hooks added through
@@ -571,6 +574,7 @@ ExitCode runMongosServer(ServiceContext* serviceContext) {
auto shardedHookList = std::make_unique<rpc::EgressMetadataHookList>();
shardedHookList->addHook(std::make_unique<rpc::LogicalTimeMetadataHook>(serviceContext));
+ shardedHookList->addHook(std::make_unique<rpc::ClientMetadataPropagationEgressHook>());
shardedHookList->addHook(
std::make_unique<rpc::ShardingEgressMetadataHookForMongos>(serviceContext));
shardedHookList->addHook(std::make_unique<rpc::CommittedOpTimeMetadataHook>(serviceContext));