summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/collection_catalog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/catalog/collection_catalog.cpp')
-rw-r--r--src/mongo/db/catalog/collection_catalog.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/mongo/db/catalog/collection_catalog.cpp b/src/mongo/db/catalog/collection_catalog.cpp
index aca202437d7..e45b1ed2954 100644
--- a/src/mongo/db/catalog/collection_catalog.cpp
+++ b/src/mongo/db/catalog/collection_catalog.cpp
@@ -532,14 +532,6 @@ void CollectionCatalog::write(ServiceContext* svcCtx, CatalogWriteFn job) {
void CollectionCatalog::write(OperationContext* opCtx,
std::function<void(CollectionCatalog&)> job) {
- if (opCtx->lockState()->isW()) {
- // Modifications can be done in-place when the global exclusive lock is held as all active
- // transactions and cursors are closed.
- auto& storage = getCatalog(opCtx->getServiceContext());
- auto base = atomic_load(&storage.catalog);
- job(*base);
- return;
- }
write(opCtx->getServiceContext(), std::move(job));
}