summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/create_indexes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/create_indexes.cpp')
-rw-r--r--src/mongo/db/commands/create_indexes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/commands/create_indexes.cpp b/src/mongo/db/commands/create_indexes.cpp
index 9b0cfae466d..15add881ec2 100644
--- a/src/mongo/db/commands/create_indexes.cpp
+++ b/src/mongo/db/commands/create_indexes.cpp
@@ -425,10 +425,10 @@ public:
writeConflictRetry(opCtx, kCommandName, ns.ns(), [&] {
WriteUnitOfWork wunit(opCtx);
- indexer.commit([opCtx, &ns, collection](const BSONObj& spec) {
+ uassertStatusOK(indexer.commit([opCtx, &ns, collection](const BSONObj& spec) {
opCtx->getServiceContext()->getOpObserver()->onCreateIndex(
opCtx, ns, *(collection->uuid()), spec, false);
- });
+ }));
wunit.commit();
});