summaryrefslogtreecommitdiff
path: root/src/mongo/s
diff options
context:
space:
mode:
authorJordi Serra Torrens <jordi.serra-torrens@mongodb.com>2022-03-10 20:00:15 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-03-10 20:52:09 +0000
commit4ba31bc8627426538307848866d3165a17aa29fb (patch)
treedbafc19f2050b915dc5da92c3e353e862fe0bf17 /src/mongo/s
parent11d01816f743d6764c4f12c42697f5edf813ce27 (diff)
downloadmongo-4ba31bc8627426538307848866d3165a17aa29fb.tar.gz
SERVER-64245 Make SetUserWriteBlockModeCoordinator set the write blocking state on the shards
Diffstat (limited to 'src/mongo/s')
-rw-r--r--src/mongo/s/commands/cluster_set_user_write_block_mode_command.cpp1
-rw-r--r--src/mongo/s/request_types/sharded_ddl_commands.idl29
2 files changed, 29 insertions, 1 deletions
diff --git a/src/mongo/s/commands/cluster_set_user_write_block_mode_command.cpp b/src/mongo/s/commands/cluster_set_user_write_block_mode_command.cpp
index cceb1449ddb..e95ae7c5f16 100644
--- a/src/mongo/s/commands/cluster_set_user_write_block_mode_command.cpp
+++ b/src/mongo/s/commands/cluster_set_user_write_block_mode_command.cpp
@@ -33,7 +33,6 @@
#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/commands.h"
-#include "mongo/db/commands/set_user_write_block_mode_gen.h"
#include "mongo/logv2/log.h"
#include "mongo/s/grid.h"
#include "mongo/s/request_types/sharded_ddl_commands_gen.h"
diff --git a/src/mongo/s/request_types/sharded_ddl_commands.idl b/src/mongo/s/request_types/sharded_ddl_commands.idl
index 0d9cc898bd1..9bd7602a7dc 100644
--- a/src/mongo/s/request_types/sharded_ddl_commands.idl
+++ b/src/mongo/s/request_types/sharded_ddl_commands.idl
@@ -51,6 +51,20 @@ types:
serializer: "mongo::CollectionType::toBSON"
deserializer: "mongo::CollectionType"
+enums:
+ ShardsvrSetUserWriteBlockModePhase:
+ description: "Phase for the _shardsvrSetUserWriteBlockMode command."
+ type: string
+ values:
+ # When enabling user write blocking, kPrepare means the shard will start blocking
+ # sharded DDL operations. When disabling user write blocking, kPrepare means the shard
+ # will to start accepting user writes again.
+ kPrepare: "prepare"
+ # When enabling user write blocking, kComplete means the shard will start blocking
+ # user writes. When disabling user write blocking, kComplete means the shard
+ # will to start accepting sharded DDL operations again.
+ kComplete: "complete"
+
structs:
ConfigsvrCreateDatabaseResponse:
@@ -399,6 +413,21 @@ commands:
chained_structs:
SetUserWriteBlockModeRequest: SetUserWriteBlockModeRequest
+ _shardsvrSetUserWriteBlockMode:
+ command_name: _shardsvrSetUserWriteBlockMode
+ cpp_name: ShardsvrSetUserWriteBlockMode
+ description: "internal _shardsvrSetUserWriteBlockMode command"
+ namespace: ignored
+ api_version: ""
+ strict: false
+ chained_structs:
+ SetUserWriteBlockModeRequest: SetUserWriteBlockModeRequest
+ fields:
+ phase:
+ type: ShardsvrSetUserWriteBlockModePhase
+ description: "Determines the phase of the blocking/unblocking procedure to be
+ executed."
+
_configsvrSetClusterParameter:
command_name: _configsvrSetClusterParameter
cpp_name: ConfigsvrSetClusterParameter