summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/system_index.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/system_index.cpp b/src/mongo/db/system_index.cpp
index 6f3ad2a4410..b08598d0f51 100644
--- a/src/mongo/db/system_index.cpp
+++ b/src/mongo/db/system_index.cpp
@@ -41,6 +41,7 @@
#include "mongo/db/catalog/commit_quorum_options.h"
#include "mongo/db/catalog/index_catalog.h"
#include "mongo/db/catalog/index_key_validate.h"
+#include "mongo/db/concurrency/write_conflict_exception.h"
#include "mongo/db/db_raii.h"
#include "mongo/db/index/index_descriptor.h"
#include "mongo/db/index_builds_coordinator.h"
@@ -220,6 +221,8 @@ void createSystemIndexes(OperationContext* opCtx, CollectionWriter& collection)
try {
IndexBuildsCoordinator::get(opCtx)->createIndexesOnEmptyCollection(
opCtx, collection, {indexSpec}, fromMigrate);
+ } catch (WriteConflictException&) {
+ throw;
} catch (DBException& ex) {
fassertFailedWithStatus(40456, ex.toStatus());
}