summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/multi_index_block.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/catalog/multi_index_block.cpp')
-rw-r--r--src/mongo/db/catalog/multi_index_block.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/catalog/multi_index_block.cpp b/src/mongo/db/catalog/multi_index_block.cpp
index db0f8ba47c1..62aaf35c57d 100644
--- a/src/mongo/db/catalog/multi_index_block.cpp
+++ b/src/mongo/db/catalog/multi_index_block.cpp
@@ -461,7 +461,8 @@ Status MultiIndexBlock::insertAllDocumentsInCollection(
n++;
}
} catch (DBException& ex) {
- if (ex.isA<ErrorCategory::Interruption>() || ex.isA<ErrorCategory::ShutdownError>()) {
+ if (ex.isA<ErrorCategory::Interruption>() || ex.isA<ErrorCategory::ShutdownError>() ||
+ ErrorCodes::IndexBuildAborted == ex.code()) {
// If the collection scan is stopped because due to an interrupt or shutdown event, we
// leave the internal state intact to ensure we have the correct information for
// resuming this index build during startup and rollback.