From bfafd4fd7fb7ef99c9a12714728a9f4a7ade4397 Mon Sep 17 00:00:00 2001 From: Gregory Wlodarek Date: Fri, 16 Sep 2022 15:06:37 +0000 Subject: SERVER-69766 Dump WiredTiger information when dropIdent() returns EBUSY outside of the ident reaper --- src/mongo/db/storage/storage_engine_impl.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 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(); } -- cgit v1.2.1