diff options
author | A. Jesse Jiryu Davis <jesse@mongodb.com> | 2018-12-05 16:52:35 -0500 |
---|---|---|
committer | A. Jesse Jiryu Davis <jesse@mongodb.com> | 2018-12-12 08:54:29 -0500 |
commit | 597b4748fc36210c61cf4d6c086d364013df740a (patch) | |
tree | 7e0822ae7f22cb19d3f3ae7c9e73e15beb9bf70d /src/mongo | |
parent | 014a3045ac1e058ad1d5a458fa1cf110c0bd91b1 (diff) | |
download | mongo-597b4748fc36210c61cf4d6c086d364013df740a.tar.gz |
SERVER-34943 Ignore internal commands with "failCommand"
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/commands.cpp | 6 |
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; |