summaryrefslogtreecommitdiff
path: root/src/mongo/db/index_builds_coordinator.cpp
diff options
context:
space:
mode:
authorGregory Noma <gregory.noma@gmail.com>2022-09-09 14:23:39 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-09 15:13:52 +0000
commit25cc0c7a1b9078115a3b1785af4d6f7698e8f9af (patch)
tree3bc1aea2ff899a36562d0c66916322c83602ae46 /src/mongo/db/index_builds_coordinator.cpp
parent3c45dd708de29d6682661cccb2fce7eddf2914e2 (diff)
downloadmongo-25cc0c7a1b9078115a3b1785af4d6f7698e8f9af.tar.gz
SERVER-69505 Allow `InterruptedAtShutdown` during index build cleanup
Diffstat (limited to 'src/mongo/db/index_builds_coordinator.cpp')
-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 3ce99611f15..0b56b93348b 100644
--- a/src/mongo/db/index_builds_coordinator.cpp
+++ b/src/mongo/db/index_builds_coordinator.cpp
@@ -2396,7 +2396,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);