diff options
author | Benety Goh <benety@mongodb.com> | 2018-11-20 20:33:14 -0500 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2018-11-20 20:33:14 -0500 |
commit | 74e5e8949bcc62bde1f1455b463fc89f07649ead (patch) | |
tree | cc6c40c38410d9573740d05026ddf75694f8541b /src/mongo/db/repair_database.cpp | |
parent | 820e9411adda1ba8da5909317bac7a9229f49efe (diff) | |
download | mongo-74e5e8949bcc62bde1f1455b463fc89f07649ead.tar.gz |
SERVER-37763 MultiIndexBlock::commit() returns Status
This allows MultiIndexBlock to support aborting index builds.
Diffstat (limited to 'src/mongo/db/repair_database.cpp')
-rw-r--r-- | src/mongo/db/repair_database.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/repair_database.cpp b/src/mongo/db/repair_database.cpp index 8958fdaa525..da970fb3a8b 100644 --- a/src/mongo/db/repair_database.cpp +++ b/src/mongo/db/repair_database.cpp @@ -219,7 +219,10 @@ Status rebuildIndexesOnCollection(OperationContext* opCtx, { WriteUnitOfWork wunit(opCtx); - indexer->commit(); + status = indexer->commit(); + if (!status.isOK()) { + return status; + } rs->updateStatsAfterRepair(opCtx, numRecords, dataSize); wunit.commit(); } |