diff options
author | Blake Oler <blake.oler@mongodb.com> | 2021-03-08 21:47:40 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-17 20:03:22 +0000 |
commit | d6fe0a7527ae541482fab025e2310a63f62583fc (patch) | |
tree | 7d1bbcf29321493571339207327dbb71c04801a1 /src/mongo/executor | |
parent | 2a7d4e1159ee9484ffd1954b220957b1679b74c2 (diff) | |
download | mongo-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.cpp | 8 |
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( |