summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2022-09-16 15:06:37 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-16 17:09:38 +0000
commitbfafd4fd7fb7ef99c9a12714728a9f4a7ade4397 (patch)
tree522f73e63b71220dab38eb3e570a4a45f47f4cf0
parentf81093713522be99a93571f0f3e5f0e16c4db600 (diff)
downloadmongo-bfafd4fd7fb7ef99c9a12714728a9f4a7ade4397.tar.gz
SERVER-69766 Dump WiredTiger information when dropIdent() returns EBUSY outside of the ident reaper
-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();
}