diff options
author | Jordi Serra Torrens <jordi.serra-torrens@mongodb.com> | 2022-03-22 17:59:51 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-22 20:54:09 +0000 |
commit | 07c3d2ebcd3ca8127ed5a5aaabf439b57697b530 (patch) | |
tree | ef9f4fce9eb25c798f5f4a38e22ef361a252ea67 /src/mongo/db/s/sharding_ddl_util.cpp | |
parent | 4f948f1d54efadcbe7e3eaa0f1c2de88566dc3bd (diff) | |
download | mongo-07c3d2ebcd3ca8127ed5a5aaabf439b57697b530.tar.gz |
SERVER-63724 ShardingDDLCoordinators should forward the WriteBlockBypass flag when running commands on participant shards
Diffstat (limited to 'src/mongo/db/s/sharding_ddl_util.cpp')
-rw-r--r-- | src/mongo/db/s/sharding_ddl_util.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/s/sharding_ddl_util.cpp b/src/mongo/db/s/sharding_ddl_util.cpp index c66375b6c06..8a0c739d051 100644 --- a/src/mongo/db/s/sharding_ddl_util.cpp +++ b/src/mongo/db/s/sharding_ddl_util.cpp @@ -42,7 +42,9 @@ #include "mongo/db/s/shard_filtering_metadata_refresh.h" #include "mongo/db/s/sharding_logging.h" #include "mongo/db/s/sharding_util.h" +#include "mongo/db/server_feature_flags_gen.h" #include "mongo/db/vector_clock.h" +#include "mongo/db/write_block_bypass.h" #include "mongo/logv2/log.h" #include "mongo/rpc/metadata/impersonated_user_metadata.h" #include "mongo/s/catalog/type_chunk.h" @@ -209,6 +211,9 @@ std::vector<AsyncRequestsSender::Response> sendAuthenticatedCommandToShards( // the command BSONObjBuilder bob(command); rpc::writeAuthDataToImpersonatedUserMetadata(opCtx, &bob); + if (gFeatureFlagUserWriteBlocking.isEnabled(serverGlobalParams.featureCompatibility)) { + WriteBlockBypass::get(opCtx).writeAsMetadata(&bob); + } auto authenticatedCommand = bob.obj(); return sharding_util::sendCommandToShards( opCtx, dbName, authenticatedCommand, shardIds, executor); |