summaryrefslogtreecommitdiff
path: root/src/mongo/executor
diff options
context:
space:
mode:
authorBlake Oler <blake.oler@mongodb.com>2021-03-08 21:47:40 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-17 20:03:22 +0000
commitd6fe0a7527ae541482fab025e2310a63f62583fc (patch)
tree7d1bbcf29321493571339207327dbb71c04801a1 /src/mongo/executor
parent2a7d4e1159ee9484ffd1954b220957b1679b74c2 (diff)
downloadmongo-d6fe0a7527ae541482fab025e2310a63f62583fc.tar.gz
SERVER-54996 Change FailPoint::pauseWhileSetAndNotCanceled() to throw on cancelation
Diffstat (limited to 'src/mongo/executor')
-rw-r--r--src/mongo/executor/task_executor.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/executor/task_executor.cpp b/src/mongo/executor/task_executor.cpp
index 1f3fe80e6bc..89b136a3fee 100644
--- a/src/mongo/executor/task_executor.cpp
+++ b/src/mongo/executor/task_executor.cpp
@@ -95,8 +95,12 @@ ExecutorFuture<Response> wrapScheduleCallWithCancelTokenAndFuture(
// Fail point to make this method to wait until the token is canceled.
if (!token.isCanceled()) {
- pauseScheduleCallWithCancelTokenUntilCanceled.pauseWhileSetAndNotCanceled(
- Interruptible::notInterruptible(), token);
+ try {
+ pauseScheduleCallWithCancelTokenUntilCanceled.pauseWhileSetAndNotCanceled(
+ Interruptible::notInterruptible(), token);
+ } catch (ExceptionFor<ErrorCodes::Interrupted>&) {
+ // Swallow the interrupted exception that arrives from canceling a failpoint.
+ }
}
auto scheduleStatus = wrapCallbackHandleWithCancelToken(