summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Noma <gregory.noma@gmail.com>2022-09-12 14:33:19 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-12 15:37:30 +0000
commit3e8689788c218c6e13e2b423145771e3768c5c5d (patch)
tree8501e6cbbc65fa3c5f60a6c9c27bea99434f2f8c
parent3ec1e222a0a6144d94888578e09c256b14bddc00 (diff)
downloadmongo-3e8689788c218c6e13e2b423145771e3768c5c5d.tar.gz
SERVER-69505 Allow `InterruptedAtShutdown` during index build cleanup
-rw-r--r--src/mongo/db/index_builds_coordinator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/index_builds_coordinator.cpp b/src/mongo/db/index_builds_coordinator.cpp
index c410f390fe6..47873197c00 100644
--- a/src/mongo/db/index_builds_coordinator.cpp
+++ b/src/mongo/db/index_builds_coordinator.cpp
@@ -2393,7 +2393,9 @@ void IndexBuildsCoordinator::_runIndexBuildInner(
fassertFailedNoTrace(5642402);
}
// TODO (SERVER-69264): Remove ErrorCodes::CannotCreateIndex.
- invariant(opCtx->isKillPending() || status.code() == ErrorCodes::CannotCreateIndex,
+ // TODO (SERVER-69496): Remove ErrorCodes::InterruptedAtShutdown.
+ invariant(opCtx->isKillPending() || status.code() == ErrorCodes::CannotCreateIndex ||
+ status.code() == ErrorCodes::InterruptedAtShutdown,
str::stream() << "Unexpected error code during index build cleanup: " << status);
if (IndexBuildProtocol::kSinglePhase == replState->protocol) {
_cleanUpSinglePhaseAfterFailure(opCtx, collection, replState, indexBuildOptions, status);