summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/catalog/collection_catalog_helper.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/catalog/collection_catalog_helper.cpp b/src/mongo/db/catalog/collection_catalog_helper.cpp
index 7719ef531d1..2a10fef2066 100644
--- a/src/mongo/db/catalog/collection_catalog_helper.cpp
+++ b/src/mongo/db/catalog/collection_catalog_helper.cpp
@@ -34,6 +34,9 @@
#include "mongo/db/concurrency/d_concurrency.h"
namespace mongo {
+
+MONGO_FAIL_POINT_DEFINE(hangBeforeGettingNextCollection);
+
namespace catalog {
void forEachCollectionFromDb(OperationContext* opCtx,
@@ -57,6 +60,7 @@ void forEachCollectionFromDb(OperationContext* opCtx,
}
Lock::CollectionLock clk(opCtx, *nss, collLockMode);
+ opCtx->recoveryUnit()->abandonSnapshot();
auto collection = catalog.lookupCollectionByUUID(uuid);
auto catalogEntry = catalog.lookupCollectionCatalogEntryByUUID(uuid);
@@ -65,6 +69,8 @@ void forEachCollectionFromDb(OperationContext* opCtx,
if (!callback(collection, catalogEntry))
break;
+
+ MONGO_FAIL_POINT_PAUSE_WHILE_SET(hangBeforeGettingNextCollection);
}
}