diff options
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; |