diff options
author | Benety Goh <benety@mongodb.com> | 2020-10-01 11:03:19 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-10-01 15:31:49 +0000 |
commit | 078aa203f8625c4e1227ffc4e316cea218eb15c9 (patch) | |
tree | f969a51c1d7f16580967c9f8138194a959b5b904 /src/mongo/db/catalog/multi_index_block.cpp | |
parent | c1401d158b915996aacd0e43b666ca3f7b0e9305 (diff) | |
download | mongo-078aa203f8625c4e1227ffc4e316cea218eb15c9.tar.gz |
SERVER-51238 fix index build phase when aborting index build for rollback
Diffstat (limited to 'src/mongo/db/catalog/multi_index_block.cpp')
-rw-r--r-- | src/mongo/db/catalog/multi_index_block.cpp | 3 |
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. |