Storage Engine API
database_impl.cpp File Reference
#include "mongo/platform/basic.h"
#include "mongo/db/catalog/database_impl.h"
#include <algorithm>
#include <boost/filesystem/operations.hpp>
#include <memory>
#include "mongo/base/init.h"
#include "mongo/db/audit.h"
#include "mongo/db/background.h"
#include "mongo/db/catalog/collection.h"
#include "mongo/db/catalog/collection_catalog_entry.h"
#include "mongo/db/catalog/collection_options.h"
#include "mongo/db/catalog/database_catalog_entry.h"
#include "mongo/db/catalog/database_holder.h"
#include "mongo/db/catalog/drop_indexes.h"
#include "mongo/db/catalog/index_catalog.h"
#include "mongo/db/catalog/namespace_uuid_cache.h"
#include "mongo/db/catalog/uuid_catalog.h"
#include "mongo/db/clientcursor.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/concurrency/write_conflict_exception.h"
#include "mongo/db/curop.h"
#include "mongo/db/index/index_access_method.h"
#include "mongo/db/introspect.h"
#include "mongo/db/op_observer.h"
#include "mongo/db/query/collation/collator_factory_interface.h"
#include "mongo/db/repl/drop_pending_collection_reaper.h"
#include "mongo/db/repl/oplog.h"
#include "mongo/db/repl/replication_coordinator.h"
#include "mongo/db/s/operation_sharding_state.h"
#include "mongo/db/server_options.h"
#include "mongo/db/server_parameters.h"
#include "mongo/db/service_context.h"
#include "mongo/db/stats/top.h"
#include "mongo/db/storage/recovery_unit.h"
#include "mongo/db/storage/storage_engine.h"
#include "mongo/db/storage/storage_engine_init.h"
#include "mongo/db/storage/storage_options.h"
#include "mongo/db/system_index.h"
#include "mongo/db/views/view_catalog.h"
#include "mongo/platform/random.h"
#include "mongo/s/cannot_implicitly_create_collection_info.h"
#include "mongo/stdx/memory.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/fail_point_service.h"
#include "mongo/util/log.h"

Classes

class  mongo::DatabaseImpl::AddCollectionChange
 
class  mongo::DatabaseImpl::RemoveCollectionChange
 

Namespaces

 mongo
 Copyright (C) 2014 MongoDB Inc.
 

Macros

#define MONGO_LOG_DEFAULT_COMPONENT   ::mongo::logger::LogComponent::kStorage
 Copyright (C) 2017 MongoDB Inc. More...
 

Functions

void mongo::uassertNamespaceNotIndex (StringData ns, StringData caller)
 
 mongo::LOG (1)<< "create collection "<< ns<< ' '<< options
 
 mongo::if (!status.isOK()) return status
 
 mongo::if (!collectionOptions.collation.isEmpty())
 
 mongo::if (!collectionOptions.validator.isEmpty())
 
 mongo::if (auto indexOptions=collectionOptions.indexOptionDefaults["storageEngine"])
 
 mongo::if (collectionOptions.isView())
 

Variables

Database *const mongo::this_
 
Database *const OperationContext *const const StringData mongo::name
 
Database *const OperationContext *const const StringData DatabaseCatalogEntry *const mongo::dbEntry
 
OperationContext Database * mongo::db
 
OperationContext Database StringData BSONObj mongo::options
 
OperationContext Database StringData BSONObj CollectionOptions::ParseKind mongo::parseKind
 
OperationContext Database StringData BSONObj CollectionOptions::ParseKind bool mongo::createDefaultIndexes
 
OperationContext Database StringData BSONObj CollectionOptions::ParseKind bool const BSONObj &idIndex mongo::Status
 
if(collection) return Status(ErrorCodes if(db->getViewCatalog() ->lookup(opCtx, ns)) return Status(ErrorCodes CollectionOptions mongo::collectionOptions
 
Status mongo::status = collectionOptions.parse(options, parseKind)
 
std::unique_ptr< CollatorInterface > mongo::collator
 
 mongo::else
 

Macro Definition Documentation

◆ MONGO_LOG_DEFAULT_COMPONENT

#define MONGO_LOG_DEFAULT_COMPONENT   ::mongo::logger::LogComponent::kStorage

Copyright (C) 2017 MongoDB Inc.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License, version 3, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.

As a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library under certain conditions as described in each individual source file and distribute linked combinations including the program with the OpenSSL library. You must comply with the GNU Affero General Public License in all respects for all of the code used other than as permitted herein. If you modify file(s) with this exception, you may extend this exception to your version of the file(s), but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. If you delete this exception statement from all source files in the program, then also delete it in the license file.