summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/database_impl.cpp
diff options
context:
space:
mode:
authorXiangyu Yao <xiangyu.yao@mongodb.com>2019-06-20 12:28:04 -0400
committerXiangyu Yao <xiangyu.yao@mongodb.com>2019-06-20 12:28:04 -0400
commitb4f508babb7c3e31c101e62e4411f12476e9c6d8 (patch)
tree8b1bcb451eae2ddeaee21432a444658412ba2c3d /src/mongo/db/catalog/database_impl.cpp
parenteee4bc704dde28d388a100f5d7fe2d54114cd48a (diff)
downloadmongo-b4f508babb7c3e31c101e62e4411f12476e9c6d8.tar.gz
SERVER-40478 Merge StorageEngine class with KVStorageEngine
Diffstat (limited to 'src/mongo/db/catalog/database_impl.cpp')
-rw-r--r--src/mongo/db/catalog/database_impl.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mongo/db/catalog/database_impl.cpp b/src/mongo/db/catalog/database_impl.cpp
index 857a8d0a9b9..3e981742a6e 100644
--- a/src/mongo/db/catalog/database_impl.cpp
+++ b/src/mongo/db/catalog/database_impl.cpp
@@ -65,7 +65,7 @@
#include "mongo/db/server_options.h"
#include "mongo/db/service_context.h"
#include "mongo/db/stats/top.h"
-#include "mongo/db/storage/kv/kv_storage_engine.h"
+#include "mongo/db/storage/kv/kv_catalog.h"
#include "mongo/db/storage/recovery_unit.h"
#include "mongo/db/storage/storage_engine.h"
#include "mongo/db/storage/storage_engine_init.h"
@@ -474,8 +474,7 @@ Status DatabaseImpl::_finishDropCollection(OperationContext* opCtx,
UUID uuid = *collection->uuid();
log() << "Finishing collection drop for " << nss << " (" << uuid << ").";
- auto storageEngine =
- checked_cast<KVStorageEngine*>(opCtx->getServiceContext()->getStorageEngine());
+ auto storageEngine = opCtx->getServiceContext()->getStorageEngine();
auto status = storageEngine->getCatalog()->dropCollection(opCtx, nss);
if (!status.isOK())
return status;
@@ -533,8 +532,7 @@ Status DatabaseImpl::renameCollection(OperationContext* opCtx,
Top::get(opCtx->getServiceContext()).collectionDropped(fromNss);
- auto storageEngine =
- checked_cast<KVStorageEngine*>(opCtx->getServiceContext()->getStorageEngine());
+ auto storageEngine = opCtx->getServiceContext()->getStorageEngine();
Status status = storageEngine->getCatalog()->renameCollection(opCtx, fromNss, toNss, stayTemp);
// Set the namespace of 'collToRename' from within the CollectionCatalog. This is necessary
@@ -663,8 +661,7 @@ Collection* DatabaseImpl::createCollection(OperationContext* opCtx,
<< " UUID: " << optionsWithUUID.uuid.get() << " and options: " << options.toBSON();
// Create CollectionCatalogEntry
- auto storageEngine =
- checked_cast<KVStorageEngine*>(opCtx->getServiceContext()->getStorageEngine());
+ auto storageEngine = opCtx->getServiceContext()->getStorageEngine();
auto statusWithCatalogEntry = storageEngine->getCatalog()->createCollection(
opCtx, nss, optionsWithUUID, true /*allocateDefaultSpace*/);
massertStatusOK(statusWithCatalogEntry.getStatus());