diff options
author | Jennifer Peshansky <jennifer.peshansky@mongodb.com> | 2022-11-03 16:13:20 +0000 |
---|---|---|
committer | Jennifer Peshansky <jennifer.peshansky@mongodb.com> | 2022-11-03 16:13:20 +0000 |
commit | e74d2910bbe76790ad131d53fee277829cd95982 (patch) | |
tree | cabe148764529c9623652374fbc36323a550cd44 /src/mongo/db/s/cluster_write_cmd_d.cpp | |
parent | 280145e9940729480bb8a35453d4056afac87641 (diff) | |
parent | ba467f46cc1bc49965e1d72b541eff0cf1d7b22e (diff) | |
download | mongo-jenniferpeshansky/SERVER-70854.tar.gz |
Merge branch 'master' into jenniferpeshansky/SERVER-70854jenniferpeshansky/SERVER-70854
Diffstat (limited to 'src/mongo/db/s/cluster_write_cmd_d.cpp')
-rw-r--r-- | src/mongo/db/s/cluster_write_cmd_d.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mongo/db/s/cluster_write_cmd_d.cpp b/src/mongo/db/s/cluster_write_cmd_d.cpp index c8f75d69e15..66167ab2b30 100644 --- a/src/mongo/db/s/cluster_write_cmd_d.cpp +++ b/src/mongo/db/s/cluster_write_cmd_d.cpp @@ -57,6 +57,11 @@ struct ClusterInsertCmdD { // which triggers an invariant, so only shard servers can run this. uassertStatusOK(ShardingState::get(opCtx)->canAcceptShardedCommands()); } + + static void checkCanExplainHere(OperationContext* opCtx) { + uasserted(ErrorCodes::CommandNotSupported, + "Cannot explain a cluster insert command on a mongod"); + } }; ClusterInsertCmdBase<ClusterInsertCmdD> clusterInsertCmdD; @@ -83,6 +88,10 @@ struct ClusterUpdateCmdD { // which triggers an invariant, so only shard servers can run this. uassertStatusOK(ShardingState::get(opCtx)->canAcceptShardedCommands()); } + + static void checkCanExplainHere(OperationContext* opCtx) { + uasserted(ErrorCodes::CommandNotSupported, "Explain on a clusterDelete is not supported"); + } }; ClusterUpdateCmdBase<ClusterUpdateCmdD> clusterUpdateCmdD; @@ -109,6 +118,11 @@ struct ClusterDeleteCmdD { // which triggers an invariant, so only shard servers can run this. uassertStatusOK(ShardingState::get(opCtx)->canAcceptShardedCommands()); } + + static void checkCanExplainHere(OperationContext* opCtx) { + uasserted(ErrorCodes::CommandNotSupported, + "Cannot explain a cluster delete command on a mongod"); + } }; ClusterDeleteCmdBase<ClusterDeleteCmdD> clusterDeleteCmdD; |