summaryrefslogtreecommitdiff
path: root/src/mongo/s
diff options
context:
space:
mode:
authorMarcos José Grillo Ramirez <marcos.grillo@mongodb.com>2021-06-11 09:10:11 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-06-11 09:47:41 +0000
commit7679fadf823e027a30ac81d7a1ec397fe97a0fde (patch)
treeedf1ef1bc8be3ac025b66ae26b00a1ec616e28dd /src/mongo/s
parente40a2e909716ecaa82a440e9b7831eae17140212 (diff)
downloadmongo-7679fadf823e027a30ac81d7a1ec397fe97a0fde.tar.gz
SERVER-57114 Change refine collection shard key command to use ShardingDDLCoordinator
... instead of ShardinDDLCoordinator_NORESILIENT
Diffstat (limited to 'src/mongo/s')
-rw-r--r--src/mongo/s/commands/cluster_refine_collection_shard_key_cmd.cpp6
-rw-r--r--src/mongo/s/request_types/sharded_ddl_commands.idl16
2 files changed, 15 insertions, 7 deletions
diff --git a/src/mongo/s/commands/cluster_refine_collection_shard_key_cmd.cpp b/src/mongo/s/commands/cluster_refine_collection_shard_key_cmd.cpp
index ecd8266b483..ce3fa693d57 100644
--- a/src/mongo/s/commands/cluster_refine_collection_shard_key_cmd.cpp
+++ b/src/mongo/s/commands/cluster_refine_collection_shard_key_cmd.cpp
@@ -66,8 +66,10 @@ public:
}
// Send it to the primary shard
- ShardsvrRefineCollectionShardKey refineCollectionShardKeyCommand(nss,
- request().getKey());
+ RefineCollectionShardKeyRequest requestParamObj;
+ requestParamObj.setNewShardKey(request().getKey());
+ ShardsvrRefineCollectionShardKey refineCollectionShardKeyCommand(nss);
+ refineCollectionShardKeyCommand.setRefineCollectionShardKeyRequest(requestParamObj);
auto cmdResponse = executeCommandAgainstDatabasePrimary(
opCtx,
diff --git a/src/mongo/s/request_types/sharded_ddl_commands.idl b/src/mongo/s/request_types/sharded_ddl_commands.idl
index 81d2950189c..e736dedec09 100644
--- a/src/mongo/s/request_types/sharded_ddl_commands.idl
+++ b/src/mongo/s/request_types/sharded_ddl_commands.idl
@@ -125,6 +125,15 @@ structs:
description: "Latest version of the collection"
optional: false
+ RefineCollectionShardKeyRequest:
+ description: "Parameters sent by the router"
+ strict: false
+ fields:
+ newShardKey:
+ type: KeyPattern
+ description: "The index specification document to use as the new shard key."
+ optional: false
+
commands:
_shardsvrCreateCollection:
@@ -243,11 +252,8 @@ commands:
namespace: concatenate_with_db
api_version: ""
strict: false
- fields:
- newShardKey:
- type: KeyPattern
- description: "The index specification document to use as the new shard key."
- optional: false
+ chained_structs:
+ RefineCollectionShardKeyRequest: RefineCollectionShardKeyRequest
_configsvrCreateDatabase:
description: "The internal createDatabase command on the config server"