summaryrefslogtreecommitdiff
path: root/src/mongo/db/index_builds_coordinator.cpp
diff options
context:
space:
mode:
authorMatt Diener <matt.diener@mongodb.com>2022-10-03 16:05:03 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-10-03 17:37:40 +0000
commitedd8bd445afa1779fa453b1605f02b94afe6fde3 (patch)
tree65f1c466b0600381b61c16dfca8d414e0865a980 /src/mongo/db/index_builds_coordinator.cpp
parent29156d5721db30c199deed16f15efbefb88b7af3 (diff)
downloadmongo-edd8bd445afa1779fa453b1605f02b94afe6fde3.tar.gz
SERVER-70010 Fix opCtx interruption checks in execution codebase
Diffstat (limited to 'src/mongo/db/index_builds_coordinator.cpp')
-rw-r--r--src/mongo/db/index_builds_coordinator.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/db/index_builds_coordinator.cpp b/src/mongo/db/index_builds_coordinator.cpp
index 440cea078b1..6e17ed3789d 100644
--- a/src/mongo/db/index_builds_coordinator.cpp
+++ b/src/mongo/db/index_builds_coordinator.cpp
@@ -2407,9 +2407,8 @@ void IndexBuildsCoordinator::_runIndexBuildInner(
// * Explicitly abort the index build with abortIndexBuildByBuildUUID() before performing an
// operation that causes the index build to throw an error.
// TODO (SERVER-69264): Remove ErrorCodes::CannotCreateIndex.
- // TODO (SERVER-69496): Remove ErrorCodes::InterruptedAtShutdown.
- if (!opCtx->isKillPending() && status.code() != ErrorCodes::CannotCreateIndex &&
- status.code() != ErrorCodes::InterruptedAtShutdown) {
+ if (opCtx->checkForInterruptNoAssert().isOK() &&
+ status.code() != ErrorCodes::CannotCreateIndex) {
if (TestingProctor::instance().isEnabled()) {
LOGV2_FATAL(
6967700, "Unexpected error code during index build cleanup", "error"_attr = status);