diff options
author | Dianna Hohensee <dianna.hohensee@mongodb.com> | 2020-06-30 12:36:57 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-18 14:51:11 +0000 |
commit | 456b0e3ff9c319f494f6defcf62315cd17f8d3a6 (patch) | |
tree | eaffcb7a5e3214ea075bdfa8c642f5f2ae728a78 /src/mongo/db/repair.cpp | |
parent | 69c8bfec89840552ad3a0d2b16e465bb2c68c8cd (diff) | |
download | mongo-456b0e3ff9c319f494f6defcf62315cd17f8d3a6.tar.gz |
SERVER-49731 Create an Ident base class for RecordStore and SortedDataInterface and thread a shared_ptr<Ident> through to the KVDropPendingIdentReaper on drop collection/index.
Diffstat (limited to 'src/mongo/db/repair.cpp')
-rw-r--r-- | src/mongo/db/repair.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mongo/db/repair.cpp b/src/mongo/db/repair.cpp index d69dbcfb691..16dbf22f548 100644 --- a/src/mongo/db/repair.cpp +++ b/src/mongo/db/repair.cpp @@ -98,10 +98,18 @@ Status dropUnfinishedIndexes(OperationContext* opCtx, Collection* collection) { "repair", "Dropping unfinished index after collection was modified by repair", "index"_attr = indexName); + WriteUnitOfWork wuow(opCtx); - catalog::removeIndex( - opCtx, indexName, collection->getCatalogId(), collection->uuid(), collection->ns()); + // There are no concurrent users of the index while --repair is running, so it is OK to + // pass in a nullptr for the index 'ident', promising that the index is not in use. + catalog::removeIndex(opCtx, + indexName, + collection->getCatalogId(), + collection->uuid(), + collection->ns(), + nullptr /*ident */); wuow.commit(); + StorageRepairObserver::get(opCtx->getServiceContext()) ->invalidatingModification(str::stream() << "Dropped unfinished index '" << indexName << "' on " |