summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/storage/storage_engine_impl.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mongo/db/storage/storage_engine_impl.cpp b/src/mongo/db/storage/storage_engine_impl.cpp
index 78daf7f6e1b..41f23700381 100644
--- a/src/mongo/db/storage/storage_engine_impl.cpp
+++ b/src/mongo/db/storage/storage_engine_impl.cpp
@@ -617,7 +617,15 @@ StatusWith<StorageEngine::ReconcileResult> StorageEngineImpl::reconcileCatalogAn
const auto& toRemove = it;
LOGV2(22251, "Dropping unknown ident", "ident"_attr = toRemove);
WriteUnitOfWork wuow(opCtx);
- fassert(40591, _engine->dropIdent(opCtx->recoveryUnit(), toRemove));
+ Status status = _engine->dropIdent(opCtx->recoveryUnit(), toRemove);
+ if (!status.isOK()) {
+ // This function is called during startup recovery or after rollback to stable is
+ // finished. At these points there should be no concurrent operations accessing these
+ // idents as the exclusive global lock is held. If this fails, it signifies that there's
+ // an operation holding an open data handle on the ident.
+ opCtx->getServiceContext()->getStorageEngine()->dump();
+ fassert(40591, status);
+ }
wuow.commit();
}