summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
authorA. Jesse Jiryu Davis <jesse@mongodb.com>2018-12-05 16:52:35 -0500
committerA. Jesse Jiryu Davis <jesse@mongodb.com>2018-12-12 08:54:29 -0500
commit597b4748fc36210c61cf4d6c086d364013df740a (patch)
tree7e0822ae7f22cb19d3f3ae7c9e73e15beb9bf70d /src/mongo
parent014a3045ac1e058ad1d5a458fa1cf110c0bd91b1 (diff)
downloadmongo-597b4748fc36210c61cf4d6c086d364013df740a.tar.gz
SERVER-34943 Ignore internal commands with "failCommand"
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/db/commands.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/commands.cpp b/src/mongo/db/commands.cpp
index 2aa894c4091..a1ff6151f22 100644
--- a/src/mongo/db/commands.cpp
+++ b/src/mongo/db/commands.cpp
@@ -478,6 +478,12 @@ bool CommandHelpers::shouldActivateFailCommandFailPoint(const BSONObj& data,
return false;
}
+ if (client->session() && (client->session()->getTags() & transport::Session::kInternalClient)) {
+ if (!data.hasField("failInternalCommands") || !data.getBoolField("failInternalCommands")) {
+ return false;
+ }
+ }
+
for (auto&& failCommand : data.getObjectField("failCommands")) {
if (failCommand.type() == String && failCommand.valueStringData() == cmdName) {
return true;