summaryrefslogtreecommitdiff
path: root/src/mongo/db/curop_failpoint_helpers.cpp
diff options
context:
space:
mode:
authorIan Boros <ian.boros@10gen.com>2018-11-06 13:12:02 -0500
committerIan Boros <ian.boros@10gen.com>2018-11-12 17:18:39 -0500
commit18036e70919f14eecdc0fe44c8cd2ba90283bc25 (patch)
treeeb547909ce1a363eca5f623d6bd680c355a3a151 /src/mongo/db/curop_failpoint_helpers.cpp
parent04141490b2d5cc66be2457d3090292526dc37e4c (diff)
downloadmongo-18036e70919f14eecdc0fe44c8cd2ba90283bc25.tar.gz
SERVER-37231 add test for $out and maxTimeMS
Diffstat (limited to 'src/mongo/db/curop_failpoint_helpers.cpp')
-rw-r--r--src/mongo/db/curop_failpoint_helpers.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mongo/db/curop_failpoint_helpers.cpp b/src/mongo/db/curop_failpoint_helpers.cpp
index 635e1c66796..cc1c6027985 100644
--- a/src/mongo/db/curop_failpoint_helpers.cpp
+++ b/src/mongo/db/curop_failpoint_helpers.cpp
@@ -45,17 +45,18 @@ std::string CurOpFailpointHelpers::updateCurOpMsg(OperationContext* opCtx,
return oldMsg;
}
-void CurOpFailpointHelpers::waitWhileFailPointEnabled(
- FailPoint* failPoint,
- OperationContext* opCtx,
- const std::string& curOpMsg,
- const std::function<void(void)>& whileWaiting) {
+void CurOpFailpointHelpers::waitWhileFailPointEnabled(FailPoint* failPoint,
+ OperationContext* opCtx,
+ const std::string& curOpMsg,
+ const std::function<void(void)>& whileWaiting,
+ bool checkForInterrupt) {
invariant(failPoint);
auto origCurOpMsg = updateCurOpMsg(opCtx, curOpMsg);
MONGO_FAIL_POINT_BLOCK((*failPoint), options) {
const BSONObj& data = options.getData();
- const bool shouldCheckForInterrupt = data["shouldCheckForInterrupt"].booleanSafe();
+ const bool shouldCheckForInterrupt =
+ checkForInterrupt || data["shouldCheckForInterrupt"].booleanSafe();
while (MONGO_FAIL_POINT((*failPoint))) {
sleepFor(Milliseconds(10));
if (whileWaiting) {