Storage Engine API
mongo Namespace Reference

Copyright (C) 2014 MongoDB Inc. More...

Namespaces

 catalog
 
 CType
 
 dur
 
 harness_helper_detail
 
 index_key_validate
 
 oploghack
 
 partitioned_detail
 
 PointerTable
 
 repl
 

Classes

class  AlignedBuilder
 a page-aligned BufBuilder. More...
 
class  ArtificialTreeBuilder
 Tool to construct custom tree shapes for tests. More...
 
class  AutoAcquireFlushLockForMMAPV1Commit
 This explains how the MMAP V1 durability system is implemented. More...
 
class  AutoYieldFlushLockForMMAPV1Commit
 At global synchronization points, such as drop database we are running under a global exclusive lock and without an active write unit of work, doing changes which require global commit. More...
 
class  BalanceLeftEmpty
 
class  BalanceOneLeftToRight
 
class  BalanceOneRightToLeft
 
class  BalanceRightEmpty
 
class  BalanceSingleParentKey
 
class  BalanceSingleParentKeyPackParent
 
class  BalanceSplitParent
 
class  BalanceThreeLeftToRight
 
class  BalanceThreeRightToLeft
 
class  BSONCollectionCatalogEntry
 This is a helper class for any storage engine that wants to store catalog information as BSON. More...
 
struct  BsonRecord
 
class  BtreeBucket
 
struct  BtreeBucketV0
 This structure represents header data for a btree bucket. More...
 
struct  BtreeBucketV1
 
struct  BtreeLayoutV0
 
struct  BtreeLayoutV1
 
class  BtreeLogic
 This is the logic for manipulating the Btree. More...
 
class  BtreeLogicTestBase
 This class is made friend of BtreeLogic so we can add whatever private method accesses we need to it, to be used by the tests. More...
 
struct  BtreeLogicTestHelper
 This structure encapsulates a Btree and all the infrastructure needed by it (head manager, record store and a valid disk location to use by the tests). More...
 
class  BtreeLogicTestSuite
 
class  CantMergeLeftNoMerge
 
class  CantMergeRightNoMerge
 
class  CappedCallback
 When a capped collection is modified (delete/insert/etc) then certain notifications need to be made, which this (pure virtual) interface exposes. More...
 
class  CappedInsertNotifier
 Queries with the awaitData option use this notifier object to wait for more data to be inserted into the capped collection. More...
 
class  CappedRecordStoreV1
 
class  CappedRecordStoreV1Iterator
 This class iterates over a capped collection identified by 'ns'. More...
 
struct  CmpUnitTest
 
class  Collection
 this is NOT safe through a yield right now. More...
 
class  CollectionCatalogEntry
 
class  CollectionImpl
 
class  CollectionInfoCache
 this is for storing things that you want to cache about a single collection life cycle is managed for you from inside Collection. More...
 
class  CollectionInfoCacheImpl
 this is for storing things that you want to cache about a single collection life cycle is managed for you from inside Collection More...
 
class  CollectionMock
 This class comprises a mock Collection for use by UUIDCatalog unit tests. More...
 
struct  CollectionOptions
 
class  CommitNotifier
 Establishes a synchronization point between threads. More...
 
class  CompactDocWriter
 
struct  CompactOptions
 
struct  CompactStats
 
class  CondVarLockGrantNotification
 Notfication callback, which stores the last notification result and signals a condition variable, which can be waited on. More...
 
struct  CounterOps
 Operations for manipulating the lock statistics abstracting whether they are atomic or not. More...
 
class  Database
 Represents a logical database containing Collections. More...
 
class  DatabaseCatalogEntry
 
class  DatabaseHolder
 Registry of opened databases. More...
 
class  DatabaseHolderImpl
 Registry of opened databases. More...
 
class  DatabaseHolderMock
 Registry of opened databases. More...
 
class  DatabaseImpl
 Represents a logical database containing Collections. More...
 
class  DataFile
 
class  DataFileHeader
 
class  DataFileSync
 does background async flushes of mmapped files More...
 
class  DataFileVersion
 
class  DataProtector
 Performs an implementation specific transformation on a series of input buffers to produce a protected form of their concatenated contents. More...
 
class  DeadlockDetector
 Iteratively builds the wait-for graph, starting from a given blocked Locker and stops either when all reachable nodes have been checked or if a cycle is detected. More...
 
class  DeferredWriter
 Provides an interface for asynchronously adding to a collection. More...
 
class  DelEmptyEmptyNeighbors
 
class  DelEmptyNoNeighbors
 
class  DeletedRecord
 
class  DelInternal
 
class  DelInternalPromoteKey
 
class  DelInternalPromoteRightKey
 
class  DelInternalReplacementNextNonNull
 
class  DelInternalReplacementPrevNonNull
 
class  DelInternalReplaceRight
 
class  DelInternalReplaceWithUnused
 
class  DelInternalSplitPromoteLeft
 
class  DelInternalSplitPromoteRight
 
class  DevNullKVEngine
 The devnull storage engine is intended for unit and performance testing. More...
 
class  DevNullRecordStore
 
class  DevNullSortedDataBuilderInterface
 
class  DevNullSortedDataInterface
 
class  DisableDocumentValidation
 Disables document validation on a single OperationContext while in scope. More...
 
class  DisableDocumentValidationIfTrue
 Disables document validation while in scope if the constructor is passed true. More...
 
class  DiskLoc
 represents a disk location/offset on disk in a database. More...
 
struct  DiskLoc56Bit
 A variant of DiskLoc Used by the V1 bucket type. More...
 
class  DocWriter
 Allows inserting a Record "in-place" without creating a copy ahead of time. More...
 
class  DontMergeSingleBucket
 
class  DontReuseUnused
 
class  DummyDocWriter
 
class  DummyExtentManager
 
class  DummyRecordStoreV1MetaData
 
class  DuplicateKeys
 
class  DurableMappedFile
 DurableMappedFile adds some layers atop memory mapped files - specifically our handling of private views & such. More...
 
class  DurRecoveryUnit
 Just pass through to getDur(). More...
 
class  EmptyRecordCursor
 
class  EncryptionHooks
 
class  EphemeralForTestEngine
 
class  EphemeralForTestRecordStore
 A RecordStore that stores all data in-memory. More...
 
class  EphemeralForTestRecoveryUnit
 
class  EvenRebalanceCenter
 
class  EvenRebalanceLeft
 
class  EvenRebalanceLeftCusp
 
class  EvenRebalanceRight
 
class  EvenRebalanceRightCusp
 
class  ExportedMaxIndexBuildMemoryUsageParameter
 
struct  Extent
 
class  ExtentManager
 ExtentManager basics. More...
 
class  FastMapNoAlloc
 NOTE: This structure should not be used for anything other than the Lock Manager. More...
 
class  FileAllocator
 
class  FileOp
 
struct  FixedWidthKey
 This is the fixed width data component for storage of a key within a bucket. More...
 
class  ForceMergeLeft
 
class  ForceMergeRight
 
class  ForceSupportsDocLocking
 
class  GlobalLockAcquisitionTracker
 The GlobalLockAcquisitionTracker keeps track of if the global lock has ever been taken in X or IX mode. More...
 
class  HarnessHelper
 Sets up an OperationContext with a Recovery Unit. More...
 
class  HeadManager
 An abstraction for setting and getting data about the 'head' of an index. More...
 
class  HeadManagerImpl
 
class  HealthLog
 The interface to the local healthlog. More...
 
class  HeapRecordStoreBtree
 A RecordStore that stores all data on the heap. More...
 
class  HeapRecordStoreBtreeRecoveryUnit
 A RecoveryUnit for HeapRecordStoreBtree, this is for testing btree only. More...
 
class  IndexCatalog
 how many: 1 per Collection. More...
 
class  IndexCatalogEntry
 
class  IndexCatalogEntryContainer
 
class  IndexCatalogEntryImpl
 
class  IndexCatalogImpl
 how many: 1 per Collection. More...
 
class  IndexConsistency
 
struct  IndexDetails
 
class  IndexEntryComparison
 Compares two different IndexKeyEntry instances. More...
 
struct  IndexInfo
 The IndexConsistency class is used to keep track of the index consistency. More...
 
struct  IndexKeyEntry
 Represents a single item in an index. More...
 
struct  IndexSeekPoint
 Describes a query that can be compared against an IndexKeyEntry in a way that allows expressing exclusiveness on a prefix of the key. More...
 
class  IndexUpdateTest
 
class  JournalLatencyTestCmd
 
class  JournalListener
 This class allows for the storageEngine to alert the rest of the system about journaled write progress. More...
 
class  JournalSectionCorruptException
 Thrown when a journal section is corrupt. More...
 
class  KeyBson
 Key class for precomputing a small format index key that is denser than a traditional BSONObj. More...
 
class  KeyString
 
class  KeyV1
 
class  KeyV1Owned
 
class  KVCatalog
 
class  KVCollectionCatalogEntry
 
class  KVDatabaseCatalogEntry
 
class  KVDatabaseCatalogEntryBase
 
class  KVDatabaseCatalogEntryMock
 
class  KVEngine
 
class  KVHarnessHelper
 Creates a harness for generic KVEngine testing of all KVEngine implementations. More...
 
class  KVPrefix
 A KVPrefix may be prepended to the keys of entries in an underlying KV store. More...
 
class  KVStorageEngine
 
struct  KVStorageEngineOptions
 
class  KVStorageEngineTest
 
struct  LocAndSize
 
class  LocateEmptyForward
 
class  LocateEmptyReverse
 
class  Lock
 
class  Locker
 Interface for acquiring locks. More...
 
class  LockerForTests
 
class  LockerImpl
 Interface for acquiring locks. More...
 
class  LockerNoop
 Locker, which cannot be used to lock/unlock resources and just returns true for checks for whether a particular resource is locked. More...
 
class  LockGrantNotification
 Interface on which granted lock requests will be notified. More...
 
struct  LockHead
 There is one of these objects for each resource that has a lock request. More...
 
class  LockManager
 Entry point for the lock manager scheduling functionality. More...
 
class  LockMongoFilesExclusive
 
class  LockMongoFilesShared
 
struct  LockRequest
 There is one of those entries per each request for a lock. More...
 
struct  LockRequestCombo
 
class  LockRequestList
 Simple intrusive list implementation for the lock's granted and conflicting lists. More...
 
struct  LockStatCounters
 Bundle of locking statistics values. More...
 
class  LockStats
 Templatized lock statistics management class, which can be specialized with atomic integers for the global stats and with regular integers for the per-locker stats. More...
 
class  LogFile
 
class  MAdvise
 
class  MemJournalServerStatusMetric
 
class  MemoryMappedFile
 
class  MergeBucketsDelInternal
 
class  MergeBucketsDontReplaceHead
 
class  MergeBucketsLeft
 
class  MergeBucketsRight
 
class  MergeBucketsRightNull
 
class  MergeBucketsTestBase
 
class  MergeLeftEmpty
 
class  MergeMinLeftEmpty
 
class  MergeMinRightEmpty
 
class  MergeOption
 
class  MergeRightEmpty
 
class  MergeSizeJustRightLeft
 
class  MergeSizeJustRightRight
 
class  MergeSizeLeft
 
class  MergeSizeLeftTooBig
 
class  MergeSizeRight
 
class  MergeSizeRightTooBig
 
class  MergeSizeTestBase
 
class  MissingLocate
 
class  MissingLocateMultiBucket
 
class  MMAPV1DatabaseCatalogEntry
 
class  MMAPV1Engine
 
class  MmapV1ExtentManager
 ExtentManager basics. More...
 
struct  MMAPV1Options
 
class  MmapV1RecordFetcher
 
class  MmapV1RecordHeader
 
class  MobileDelayedOpQueue
 This class manages a queue of operations delayed for some reason. More...
 
class  MobileIndex
 
class  MobileIndexStandard
 
class  MobileIndexTestHarnessHelper
 
class  MobileIndexUnique
 
class  MobileKVEngine
 
class  MobileRecordStore
 A RecordStore that stores all data in SQLite. More...
 
class  MobileRecoveryUnit
 
class  MobileSession
 This class manages a SQLite database connection object. More...
 
class  MobileSessionPool
 This class manages a pool of open sqlite3* objects. More...
 
class  MongoFile
 
class  MongoFileFinder
 look up a MMF by filename. More...
 
class  MoveBelowLowWaterMarkLeft
 
class  MoveBelowLowWaterMarkRight
 
class  MultiIndexBlock
 Builds one or more indexes. More...
 
class  MultiIndexBlockImpl
 Builds one or more indexes. More...
 
class  Namespace
 This is used for storing a namespace on disk in a fixed witdh form and should only be used for that, not for passing internally. More...
 
class  NamespaceDetails
 
class  NamespaceDetailsCollectionCatalogEntry
 
class  NamespaceDetailsRSV1MetaData
 
class  NamespaceHashTable
 Simple, fixed size hash table used for namespace mapping (effectively the contents of the MMAP V1 .ns file). More...
 
class  NamespaceIndex
 
class  NamespaceUUIDCache
 
class  NoMergeBelowMarkLeft
 
class  NoMergeBelowMarkRight
 
class  NoMoveAtLowWaterMarkLeft
 
class  NoMoveAtLowWaterMarkRight
 
class  NoOpJournalListener
 The NoOpJournalListener is a trivial implementation of a JournalListener, that does nothing. More...
 
class  OddRebalanceCenter
 
class  OddRebalanceLeft
 
class  OddRebalanceRight
 
class  PackedDataSizeEmptyBucket
 
class  PackEmptyBucket
 
class  ParentMergeNonRightToLeft
 
class  ParentMergeNonRightToRight
 
class  Partitioned
 A templated class used to partition an associative container like a set or a map to increase scalability. More...
 
struct  PartitionedLockHead
 The PartitionedLockHead allows optimizing the case where requests overwhelmingly use the intent lock modes MODE_IS and MODE_IX, which are compatible with each other. More...
 
struct  Partitioner
 The default partitioning policy: If using a numeric built-in type, will use the lower bits of a number to decide which partition to assign it to. More...
 
class  PointerToDurableMappedFile
 for durability support we want to be able to map pointers to specific DurableMappedFile objects. More...
 
class  PosixFlushable
 
class  PreferBalanceLeft
 
class  PreferBalanceRight
 
class  PrefixedWiredTigerRecordStore
 
class  RebalancedSeparatorBase
 
class  RebalanceEmptyLeft
 
class  RebalanceEmptyRight
 
struct  Record
 The data items stored in a RecordStore. More...
 
class  RecordAccessTracker
 Used to implement likelyInPhysicalMemory() for the MMAP v1 storage engine. More...
 
class  RecordCursor
 Retrieves Records from a RecordStore. More...
 
class  RecordData
 A replacement for the Record class. More...
 
class  RecordFetcher
 Used for yielding while data is fetched from disk. More...
 
class  RecordStore
 An abstraction used for storing documents in a collection or entries in an index. More...
 
class  RecordStoreCompactAdaptor
 
class  RecordStoreHarnessHelper
 
class  RecordStoreV1Base
 
class  RecordStoreV1MetaData
 
class  RecordStoreV1RepairCursor
 This iterator will go over the collection twice - once going forward (first extent -> last extent) and once backwards in an attempt to salvage potentially corrupted or unreachable records. More...
 
class  RecordStoreValidateAdaptor
 The record store validate adaptor is used to keep track of the index consistency during a validation that's running. More...
 
class  RecoveryUnit
 A RecoveryUnit is responsible for ensuring that data is persisted. More...
 
class  RecoveryUnitHarnessHelper
 
class  RecoveryUnitNoop
 
class  RecursiveMerge
 
class  RecursiveMergeDoubleRightBucket
 
class  RecursiveMergeRightBucket
 
class  RecursiveMergeThenBalance
 
struct  RelativePath
 this is very much like a boost::path. More...
 
struct  RenameCollectionOptions
 Renames the collection from "source" to "target" and drops the existing collection with UUID dropTargetUUID iff "dropTarget" is true. More...
 
class  RepairFileDeleter
 
class  ResourceId
 Uniquely identifies a lockable resource. More...
 
class  SavedCursorRegistry
 Class that stores active cursors that have been saved (as part of yielding) to allow them to be invalidated if the thing they pointed at goes away. More...
 
class  SeekableRecordCursor
 Adds explicit seeking of records. More...
 
class  SERVER983
 Validates that adding keys incrementally produces buckets, which are 90%/10% full. More...
 
class  ShouldNotConflictWithSecondaryBatchApplicationBlock
 RAII-style class to opt out of replication's use of ParallelBatchWriterMode. More...
 
class  SimpleCreate
 
class  SimpleInsertDelete
 
class  SimpleRecordStoreV1
 
class  SimpleRecordStoreV1Iterator
 This class iterates over a non-capped collection identified by 'ns'. More...
 
class  SnapshotId
 
class  SnapshotManager
 Manages snapshots that can be read from at a later time. More...
 
class  Snapshotted
 
class  SortedDataBuilderInterface
 A version-hiding wrapper around the bulk builder for the Btree. More...
 
class  SortedDataInterface
 This interface is a work in progress. More...
 
class  SortedDataInterfaceHarnessHelper
 
class  SplitLeftHeavyBucket
 
class  SplitRightHeavyBucket
 
class  SplitUnevenBucketBase
 
class  SqliteStatement
 SqliteStatement is a wrapper around the sqlite3_stmt object. More...
 
class  StandardWiredTigerRecordStore
 
class  StatusWith
 
class  StorageEngine
 The StorageEngine class is the top level interface for creating a new storage engine. More...
 
class  StorageEngineLockFile
 
class  StorageEngineMetadata
 This reads and write the storage engine metadata file 'storage.bson' in the data directory (See –dbpath). More...
 
struct  StorageGlobalParams
 
class  TestHeadManager
 Simple head manager, which performs no validity checking or persistence. More...
 
struct  TestStruct
 
class  TrackingLockGrantNotification
 
class  UninterruptibleLockGuard
 This class prevents lock acquisitions from being interrupted when it is in scope. More...
 
class  UpdateNotifier
 
class  UUIDCatalog
 
class  UUIDCatalogObserver
 Class used for updating the UUID catalog on metadata operations. More...
 
class  ValidateAdaptor
 This is so when a RecordStore is validating all records it can call back to someone to check if a record is valid. More...
 
class  ValidateAdaptorSpy
 
struct  ValidateResults
 
class  ValidateTest
 
class  WindowsFlushable
 
class  WiredTigerBeginTxnBlock
 When constructed, this object begins a WiredTiger transaction on the provided session. More...
 
class  WiredTigerCachedCursor
 
class  WiredTigerConfigParser
 
class  WiredTigerConnection
 
class  WiredTigerCursor
 This is a smart pointer that wraps a WT_CURSOR and knows how to obtain and get from pool. More...
 
class  WiredTigerCustomizationHooks
 
class  WiredTigerEngineRuntimeConfigParameter
 WT_CONNECTION::reconfigure get/setParameter support. More...
 
class  WiredTigerExtensions
 
struct  WiredTigerFileVersion
 
class  WiredTigerGlobalOptions
 
class  WiredTigerIndex
 
class  WiredTigerIndexStandard
 
class  WiredTigerIndexUnique
 
struct  WiredTigerItem
 
class  WiredTigerKVEngine
 
class  WiredTigerOplogManager
 
class  WiredTigerRecordStore
 
class  WiredTigerRecordStoreCursorBase
 
class  WiredTigerRecordStorePrefixedCursor
 
class  WiredTigerRecordStoreStandardCursor
 
class  WiredTigerRecoveryUnit
 
class  WiredTigerServerStatusSection
 Adds "wiredTiger" to the results of db.serverStatus(). More...
 
class  WiredTigerSession
 This is a structure that caches 1 cursor for each uri. More...
 
class  WiredTigerSessionCache
 This cache implements a shared pool of WiredTiger sessions with the goal to amortize the cost of session creation and destruction over multiple uses. More...
 
class  WiredTigerSizeStorer
 The WiredTigerSizeStorer class serves as a write buffer to durably store size information for MongoDB collections. More...
 
class  WiredTigerSnapshotManager
 
class  WiredTigerUtil
 
class  WiredTigerUtilHarnessHelper
 
class  WiredTigerUtilMetadataTest
 
class  WriteConflictException
 This is thrown if during a write, two or more operations conflict with each other. More...
 
class  WriteUnitOfWork
 The WriteUnitOfWork is an RAII type that begins a storage engine write unit of work on both the Locker and the RecoveryUnit of the OperationContext. More...
 

Typedefs

using KVDatabaseCatalogEntryFactory = decltype(defaultDatabaseCatalogEntryFactory)
 
typedef int HANDLE
 
typedef boost::filesystem::path Path
 
typedef std::unique_ptr< WiredTigerSession, typename WiredTigerSessionCache::WiredTigerSessionDeleterUniqueWiredTigerSession
 A unique handle type for WiredTigerSession pointers obtained from a WiredTigerSessionCache. More...
 
typedef class FastMapNoAlloc< ResourceId, TestStructTestFastMapNoAlloc
 
typedef uint64_t LockerId
 
typedef LockerImpl< false > DefaultLockerImpl
 
typedef LockerImpl< true > MMAPV1LockerImpl
 
typedef LockStats< int64_t > SingleThreadedLockStats
 
typedef LockStats< AtomicInt64 > AtomicLockStats
 
using IndexVersion = IndexDescriptor::IndexVersion
 
using CollectionUUID = UUID
 A CollectionUUID is a 128-bit unique identifier, per RFC 4122, v4. More...
 
using OptionalCollectionUUID = boost::optional< CollectionUUID >
 

Enumerations

enum  BehaviorIfFieldIsEqual { normal = '\0', less = 'l', greater = 'g' }
 
enum  Flags { Packed = 1 }
 
enum  CanonicalsEtc {
  cminkey = 1, cnull = 2, cdouble = 4, cstring = 6,
  cbindata = 7, coid = 8, cfalse = 10, ctrue = 11,
  cdate = 12, cmaxkey = 14, cCANONTYPEMASK = 0xf, cY = 0x10,
  cint = cY | cdouble, cX = 0x20, clong = cX | cdouble, cHASMORE = 0x40,
  cNOTUSED = 0x80
}
 
enum  ValidateCmdLevel : int { kValidateIndex = 0x01, kValidateRecordStore = 0x02, kValidateFull = 0x03 }
 
enum  LockMode {
  MODE_NONE = 0, MODE_IS = 1, MODE_IX = 2, MODE_S = 3,
  MODE_X = 4, LockModesCount
}
 Lock modes. More...
 
enum  LockResult {
  LOCK_OK, LOCK_WAITING, LOCK_TIMEOUT, LOCK_DEADLOCK,
  LOCK_INVALID
}
 Return values for the locking functions of the lock manager. More...
 
enum  ResourceType {
  RESOURCE_INVALID = 0, RESOURCE_GLOBAL, RESOURCE_MMAPV1_FLUSH, RESOURCE_DATABASE,
  RESOURCE_COLLECTION, RESOURCE_METADATA, RESOURCE_MUTEX, ResourceTypesCount
}
 Hierarchy of resource types. More...
 
enum  DropCollectionSystemCollectionMode { DropCollectionSystemCollectionMode::kDisallowSystemCollectionDrops, DropCollectionSystemCollectionMode::kAllowSystemCollectionDrops }
 Drops the collection "collectionName" and populates "result" with statistics about what was removed. More...
 
enum  ValidationStage { ValidationStage::DOCUMENT, ValidationStage::INDEX, ValidationStage::NONE }
 The ValidationStage allows the IndexConsistency class to perform the correct operations that depend on where we are in the validation. More...
 
enum  ValidationOperation { ValidationOperation::INSERT, ValidationOperation::REMOVE }
 The ValidationOperation is used by classes using the IndexObserver to let us know what operation was associated with it. More...
 

Functions

GlobalInitializerRegisterer encryptionHooksInitializer ("SetEncryptionHooks", {"ServiceContext"}, [](InitializerContext *context) { EncryptionHooks::set(getGlobalServiceContext(), stdx::make_unique< EncryptionHooks >());return Status::OK();}, [](DeinitializerContext *context) { EncryptionHooks::set(getGlobalServiceContext(), nullptr);return Status::OK();})
 
SortedDataInterfacegetEphemeralForTestBtreeImpl (const Ordering &ordering, bool isUnique, std::shared_ptr< void > *dataInOut)
 Caller takes ownership. More...
 
std::ostream & operator<< (std::ostream &stream, const IndexKeyEntry &entry)
 
bool operator== (const IndexKeyEntry &lhs, const IndexKeyEntry &rhs)
 
bool operator!= (const IndexKeyEntry &lhs, const IndexKeyEntry &rhs)
 
bool operator< (const KeyString &lhs, const KeyString &rhs)
 
bool operator<= (const KeyString &lhs, const KeyString &rhs)
 
bool operator== (const KeyString &lhs, const KeyString &rhs)
 
bool operator> (const KeyString &lhs, const KeyString &rhs)
 
bool operator>= (const KeyString &lhs, const KeyString &rhs)
 
bool operator!= (const KeyString &lhs, const KeyString &rhs)
 
std::ostream & operator<< (std::ostream &stream, const KeyString &value)
 
std::unique_ptr< KVDatabaseCatalogEntryMockkvDatabaseCatalogEntryMockFactory (StringData name, KVStorageEngine *engine)
 Copyright (C) 2016 MongoDB Inc. More...
 
 TEST_F (SnapshotManagerTests, ConsistentIfNotSupported)
 
 TEST_F (SnapshotManagerTests, FailsWithNoCommittedSnapshot)
 
 TEST_F (SnapshotManagerTests, FailsAfterDropAllSnapshotsWhileYielded)
 
 TEST_F (SnapshotManagerTests, BasicFunctionality)
 
 TEST_F (SnapshotManagerTests, UpdateAndDelete)
 
 TEST_F (SnapshotManagerTests, InsertAndReadOnLocalSnapshot)
 
 TEST_F (SnapshotManagerTests, UpdateAndDeleteOnLocalSnapshot)
 
std::ostream & operator<< (std::ostream &s, const KVPrefix &prefix)
 
std::unique_ptr< KVDatabaseCatalogEntryBasedefaultDatabaseCatalogEntryFactory (const StringData name, KVStorageEngine *const engine)
 
 TEST_F (KVStorageEngineTest, ReconcileIdentsTest)
 
 TEST_F (KVStorageEngineTest, RecreateIndexes)
 
 MONGO_STATIC_ASSERT (sizeof(void *)==sizeof(size_t))
 
SortedDataInterfacegetMMAPV1Interface (HeadManager *headManager, RecordStore *recordStore, SavedCursorRegistry *cursorRegistry, const Ordering &ordering, const string &indexName, IndexVersion version, bool isUnique)
 
SortedDataInterfacegetMMAPV1Interface (HeadManager *headManager, RecordStore *recordStore, SavedCursorRegistry *cursorRegistry, const Ordering &ordering, const std::string &indexName, IndexDescriptor::IndexVersion version, bool isUnique)
 
static unittest::SuiteInstance< BtreeLogicTestSuite< BtreeLayoutV0 > > SUITE_V0 ("BTreeLogicTests_V0")
 
static unittest::SuiteInstance< BtreeLogicTestSuite< BtreeLayoutV1 > > SUITE_V1 ("BTreeLogicTests_V1")
 
 MONGO_STATIC_ASSERT (sizeof(BtreeBucketV0) - sizeof(static_cast< BtreeBucketV0 *>(NULL) ->data)==BtreeBucketV0::HeaderSize)
 
 MONGO_STATIC_ASSERT (sizeof(BtreeBucketV1) - sizeof(static_cast< BtreeBucketV1 *>(NULL) ->data)==BtreeBucketV1::HeaderSize)
 
string bigNumString (long long n, int len)
 Generates a string of the specified length containing repeated concatenation of the hexadecimal representation of the input value. More...
 
BSONObj simpleKey (char c, int n=1)
 Generates key on a field 'a', with the specified number of repetitions of the character. More...
 
int oldCompare (const BSONObj &l, const BSONObj &r, const Ordering &o)
 
int oldCompareElementValues (const BSONElement &l, const BSONElement &r)
 
int oldElemCompare (const BSONElement &l, const BSONElement &r)
 
int binDataCodeToLength (int codeByte)
 
static int compare (const unsigned char *&l, const unsigned char *&r)
 
unsigned sizeOfElement (const unsigned char *p)
 
 MONGO_STATIC_ASSERT (sizeof(NamespaceDetails)==496)
 
unsigned long long removeAndSlideBit (unsigned long long b, int x)
 
 MONGO_STATIC_ASSERT (RecordStoreV1Base::Buckets==NamespaceDetails::SmallBuckets+NamespaceDetails::LargeBuckets)
 
 TEST (NamespaceTest, Basics)
 
 TEST (NamespaceTest, ExtraName)
 
void rawCompress (const char *input, size_t input_length, char *compressed, size_t *compressed_length)
 
size_t maxCompressedLength (size_t source_len)
 
size_t compress (const char *input, size_t input_length, std::string *output)
 
bool uncompress (const char *compressed, size_t compressed_length, std::string *uncompressed)
 
 MONGO_STATIC_ASSERT (DataFileHeader::HeaderSize==8192)
 
 MONGO_STATIC_ASSERT (sizeof(static_cast< DataFileHeader *>(NULL) ->data)==4)
 
 MONGO_STATIC_ASSERT (sizeof(DataFileHeader) - sizeof(static_cast< DataFileHeader *>(NULL) ->data)==DataFileHeader::HeaderSize)
 
bool operator< (const DiskLoc &rhs, const DiskLoc &lhs)
 
bool operator<= (const DiskLoc &rhs, const DiskLoc &lhs)
 
bool operator> (const DiskLoc &rhs, const DiskLoc &lhs)
 
bool operator>= (const DiskLoc &rhs, const DiskLoc &lhs)
 
std::ostream & operator<< (std::ostream &stream, const DiskLoc &loc)
 
dur::DurableInterfacegetDur ()
 Provides a reference to the active durability interface. More...
 
 MONGO_STATIC_ASSERT (sizeof(Extent) - 4==48+128)
 
 MONGO_FAIL_POINT_DEFINE (allocateDiskFull)
 
boost::filesystem::path ensureParentDirCreated (const boost::filesystem::path &p)
 Aliases for Win32 CRT functions. More...
 
static bool useSparseFiles (int fd)
 
 MONGO_REGISTER_TEST_COMMAND (JournalLatencyTestCmd)
 
void minOSPageSizeBytesTest (size_t minOSPageSizeBytes)
 
void dataSyncFailedHandler ()
 
std::size_t getMinOSPageSizeBytes ()
 
intmax_t dbSize (const std::string &database)
 
void _deleteDataFiles (const std::string &database)
 
 MONGO_FAIL_POINT_DEFINE (recordNeedsFetchFail)
 
void _checkQuota (bool enforceQuota, int fileNo)
 
unsigned long long AlignNumber (unsigned long long number, unsigned long long granularity)
 
static voidgetNextMemoryMappedFileLocation (unsigned long long mmfSize)
 
dev_t getPartition (const std::string &path)
 
void flushMyDirectory (const boost::filesystem::path &file)
 
bool onSamePartition (const std::string &path1, const std::string &path2)
 
 MONGO_STATIC_ASSERT (16==sizeof(DeletedRecord))
 
 MONGO_STATIC_ASSERT (sizeof(RecordStoreV1Base::bucketSizes)/sizeof(RecordStoreV1Base::bucketSizes[0])==RecordStoreV1Base::Buckets)
 
static ServerStatusMetricField< Counter64 > dFreelist1 ("storage.freelist.search.requests", &freelistAllocs)
 
static ServerStatusMetricField< Counter64 > dFreelist2 ("storage.freelist.search.bucketExhausted", &freelistBucketExhausted)
 
static ServerStatusMetricField< Counter64 > dFreelist3 ("storage.freelist.search.scanned", &freelistIterations)
 
void initializeV1RS (OperationContext *opCtx, const LocAndSize *records, const LocAndSize *drecs, const LocAndSize *legacyGrabBag, DummyExtentManager *em, DummyRecordStoreV1MetaData *md)
 Creates a V1 storage/mmap_v1 with the passed in records and DeletedRecords (drecs). More...
 
void assertStateV1RS (OperationContext *opCtx, const LocAndSize *records, const LocAndSize *drecs, const LocAndSize *legacyGrabBag, const ExtentManager *em, const DummyRecordStoreV1MetaData *md)
 Asserts that the V1RecordStore defined by md has the passed in records and drecs in the correct order. More...
 
void _applyOpToDataFiles (const string &database, FileOp &fo, bool afterAllocator=false, const string &path=storageGlobalParams.dbpath)
 
void boostRenameWrapper (const Path &from, const Path &to)
 
void _renameForBackup (const std::string &database, const Path &reservedPath)
 
intmax_t dbSize (const string &database)
 
void _replaceWithRecovered (const string &database, const char *reservedPathString)
 
Path uniqueReservedPath (const char *prefix)
 
MONGO_INITIALIZER() RepairDatabaseMMapV1 (InitializerContext *context)
 
void setRepairDatabaseMmapv1Impl (stdx::function< Status(StorageEngine *engine, OperationContext *, const std::string &, bool, bool)> impl)
 
Status repairDatabaseMmapv1 (StorageEngine *engine, OperationContext *opCtx, const std::string &dbName, bool preserveClonedFilesOnFailure, bool backupOriginalFiles)
 
void setRepairDatabaseMmapv1Impl (stdx::function< Status(StorageEngine *, OperationContext *, std::string const &, bool, bool)> impl)
 
void touch_pages (const char *buf, size_t length, size_t pageSize=4096)
 Touches a range of pages, to encourage the OS to get them into the buffer pool. More...
 
std::unique_ptr< HarnessHelpermakeHarnessHelper ()
 
MONGO_INITIALIZER() RegisterHarnessFactory (InitializerContext *const)
 
GlobalInitializerRegisterer mobileKVEngineInitializer ("MobileKVEngineInit", {"ServiceContext"}, [](InitializerContext *context) { registerStorageEngine(getGlobalServiceContext(), std::make_unique< MobileFactory >());return Status::OK();}, [](DeinitializerContext *const) { return Status::OK();})
 
Status sqliteRCToStatus (int retCode, const char *prefix=NULL)
 Converts SQLite return codes to MongoDB statuses. More...
 
void checkStatus (int retStatus, int desiredStatus, const char *fnName, const char *errMsg=NULL)
 Checks if retStatus == desiredStatus; else calls fassert. More...
 
void validateLogAndAppendError (ValidateResults *results, const std::string &errMsg)
 Helper to add and log errors for validate. More...
 
void doValidate (OperationContext *opCtx, ValidateResults *results)
 Checks if the database file is corrupt. More...
 
std::unique_ptr< RecordStoreHarnessHelpernewRecordStoreHarnessHelper ()
 
std::unique_ptr< RecoveryUnitHarnessHelpernewRecoveryUnitHarnessHelper ()
 
const RecordId loc1 (0, 42)
 
const RecordId loc2 (0, 44)
 
const RecordId loc3 (0, 46)
 
const RecordId loc4 (0, 48)
 
const RecordId loc5 (0, 50)
 
const RecordId loc6 (0, 52)
 
const RecordId loc7 (0, 54)
 
const RecordId loc8 (0, 56)
 
void insertToIndex (unowned_ptr< OperationContext > opCtx, unowned_ptr< SortedDataInterface > index, std::initializer_list< IndexKeyEntry > toInsert)
 Inserts all entries in toInsert into index. More...
 
void insertToIndex (unowned_ptr< HarnessHelper > harness, unowned_ptr< SortedDataInterface > index, std::initializer_list< IndexKeyEntry > toInsert)
 
void removeFromIndex (unowned_ptr< OperationContext > opCtx, unowned_ptr< SortedDataInterface > index, std::initializer_list< IndexKeyEntry > toRemove)
 Removes all entries in toRemove from index. More...
 
void removeFromIndex (unowned_ptr< HarnessHelper > harness, unowned_ptr< SortedDataInterface > index, std::initializer_list< IndexKeyEntry > toRemove)
 
std::unique_ptr< SortedDataInterfaceHarnessHelpernewSortedDataInterfaceHarnessHelper ()
 
void initializeStorageEngine (ServiceContext *service)
 Initializes the storage engine on "service". More...
 
void shutdownGlobalStorageEngineCleanly (ServiceContext *service)
 Shuts down storage engine cleanly and releases any locks on mongod.lock. More...
 
void createLockFile (ServiceContext *service)
 Creates the lock file used to prevent concurrent processes from accessing the data files, as appropriate. More...
 
void registerStorageEngine (ServiceContext *service, std::unique_ptr< StorageEngine::Factory > factory)
 Registers a storage engine onto the given "service". More...
 
bool isRegisteredStorageEngine (ServiceContext *service, StringData name)
 Returns true if "name" refers to a registered storage engine. More...
 
StorageEngine::FactorygetFactoryForStorageEngine (ServiceContext *context, StringData name)
 Returns an unowned pointer to the factory for the named storage engine, or nullptr. More...
 
Status validateStorageOptions (ServiceContext *service, const BSONObj &storageEngineOptions, stdx::function< Status(const StorageEngine::Factory *const, const BSONObj &)> validateFunc)
 
void appendStorageEngineList (ServiceContext *service, BSONObjBuilder *result)
 
void registerHarnessHelperFactory (stdx::function< std::unique_ptr< HarnessHelper >()> factory)
 
template<typename Target , typename Current >
std::unique_ptr< Target > dynamic_ptr_cast (std::unique_ptr< Current > &&p)
 
std::unique_ptr< HarnessHelpernewHarnessHelper ()
 
int index_collator_customize (WT_COLLATOR *coll, WT_SESSION *s, const char *uri, WT_CONFIG_ITEM *metadata, WT_COLLATOR **collp)
 
MONGO_COMPILER_API_EXPORT int index_collator_extension (WT_CONNECTION *conn, WT_CONFIG_ARG *cfg)
 
 MONGO_FAIL_POINT_DEFINE (WTPausePrimaryOplogDurabilityLoop)
 
MONGO_MODULE_STARTUP_OPTIONS_REGISTER() WiredTigerOptions (InitializerContext *context)
 
 MONGO_FAIL_POINT_DEFINE (WTPrepareConflictForReads)
 
void wiredTigerPrepareConflictLog (int attempt)
 Logs a message with the number of prepare conflict retry attempts. More...
 
 MONGO_FAIL_POINT_DECLARE (WTPrepareConflictForReads)
 
template<typename F >
int wiredTigerPrepareConflictRetry (OperationContext *opCtx, F &&f)
 Runs the argument function f as many times as needed for f to return an error other than WT_PREPARE_CONFLICT. More...
 
 MONGO_FAIL_POINT_DEFINE (WTWriteConflictException)
 
 MONGO_FAIL_POINT_DEFINE (WTWriteConflictExceptionForReads)
 
 MONGO_FAIL_POINT_DECLARE (WTWriteConflictException)
 
 MONGO_FAIL_POINT_DECLARE (WTWriteConflictExceptionForReads)
 
 MONGO_FAIL_POINT_DECLARE (WTPausePrimaryOplogDurabilityLoop)
 
AtomicInt32 kWiredTigerCursorCacheSize (-100)
 
ExportedServerParameter< std::int32_t, ServerParameterType::kStartupAndRuntime > WiredTigerCursorCacheSizeSetting (ServerParameterSet::getGlobal(), "wiredTigerCursorCacheSize", &kWiredTigerCursorCacheSize)
 
Status wtRCToStatus_slow (int retCode, const char *prefix)
 
bool wt_keeptxnopen ()
 
Status wtRCToStatus (int retCode, const char *prefix=NULL)
 converts wiredtiger return codes to mongodb statuses. More...
 
 TEST_F (WiredTigerUtilMetadataTest, GetConfigurationStringInvalidURI)
 
 TEST_F (WiredTigerUtilMetadataTest, GetConfigurationStringNull)
 
 TEST_F (WiredTigerUtilMetadataTest, GetConfigurationStringSimple)
 
 TEST_F (WiredTigerUtilMetadataTest, GetApplicationMetadataInvalidURI)
 
 TEST_F (WiredTigerUtilMetadataTest, GetApplicationMetadataNull)
 
 TEST_F (WiredTigerUtilMetadataTest, GetApplicationMetadataString)
 
 TEST_F (WiredTigerUtilMetadataTest, GetApplicationMetadataDuplicateKeys)
 
 TEST_F (WiredTigerUtilMetadataTest, GetApplicationMetadataTypes)
 
 TEST_F (WiredTigerUtilMetadataTest, CheckApplicationMetadataFormatVersionMissingKey)
 
 TEST_F (WiredTigerUtilMetadataTest, CheckApplicationMetadataFormatVersionString)
 
 TEST_F (WiredTigerUtilMetadataTest, CheckApplicationMetadataFormatVersionNumber)
 
 TEST_F (WiredTigerUtilMetadataTest, CheckApplicationMetadataFormatInvalidURI)
 
 TEST (WiredTigerUtilTest, GetStatisticsValueMissingTable)
 
 TEST (WiredTigerUtilTest, GetStatisticsValueStatisticsDisabled)
 
 TEST (WiredTigerUtilTest, GetStatisticsValueInvalidKey)
 
 TEST (WiredTigerUtilTest, GetStatisticsValueValidKey)
 
 TEST (WiredTigerUtilTest, GetStatisticsValueAsUInt8)
 
 TEST (Deadlock, NoDeadlock)
 
 TEST (Deadlock, Simple)
 
 TEST (Deadlock, SimpleUpgrade)
 
 TEST (Deadlock, Indirect)
 
 TEST (Deadlock, IndirectWithUpgrade)
 
 TEST (FastMapNoAlloc, Empty)
 
 TEST (FastMapNoAlloc, NotEmpty)
 
 TEST (FastMapNoAlloc, FindNonExisting)
 
 TEST (FastMapNoAlloc, FindAndRemove)
 
 TEST (FastMapNoAlloc, RemoveAll)
 
const char * modeName (LockMode mode)
 Returns a human-readable name for the specified lock mode. More...
 
const char * legacyModeName (LockMode mode)
 Legacy lock mode names in parity for 2.6 reports. More...
 
bool isModeCovered (LockMode mode, LockMode coveringMode)
 Mode A is covered by mode B if the set of conflicts for mode A is a subset of the set of conflicts for mode B. More...
 
const char * resourceTypeName (ResourceType resourceType)
 Returns a human-readable name for the specified resource type. More...
 
const char * lockRequestStatusName (LockRequest::Status status)
 Returns a human readable status name for the specified LockRequest status. More...
 
bool isSharedLockMode (LockMode mode)
 Returns whether the passed in mode is S or IS. More...
 
 MONGO_STATIC_ASSERT (sizeof(ResourceId)==sizeof(uint64_t))
 
 TEST (ResourceId, Semantics)
 
 TEST (ResourceId, Constructors)
 
 TEST (ResourceId, Masking)
 
 TEST (LockManager, Grant)
 
 TEST (LockManager, GrantMultipleNoConflict)
 
 TEST (LockManager, GrantMultipleFIFOOrder)
 
 TEST (LockManager, GrantRecursive)
 
 TEST (LockManager, GrantRecursiveCompatibleConvertUp)
 
 TEST (LockManager, GrantRecursiveNonCompatibleConvertUp)
 
 TEST (LockManager, GrantRecursiveNonCompatibleConvertDown)
 
 TEST (LockManager, Conflict)
 
 TEST (LockManager, MultipleConflict)
 
 TEST (LockManager, ConflictCancelWaiting)
 
 TEST (LockManager, ConflictCancelMultipleWaiting)
 
 TEST (LockManager, CancelWaitingConversionWeakModes)
 
 TEST (LockManager, CancelWaitingConversionStrongModes)
 
 TEST (LockManager, ConflictingConversion)
 
 TEST (LockManager, ConflictingConversionInTheMiddle)
 
 TEST (LockManager, ConvertUpgrade)
 
 TEST (LockManager, Downgrade)
 
static void checkConflict (LockMode existingMode, LockMode newMode, bool hasConflict)
 
 TEST (LockManager, ValidateConflictMatrix)
 
 TEST (LockManager, EnqueueAtFront)
 
 TEST (LockManager, CompatibleFirstImmediateGrant)
 
 TEST (LockManager, CompatibleFirstGrantAlreadyQueued)
 
 TEST (LockManager, CompatibleFirstDelayedGrant)
 
 TEST (LockManager, CompatibleFirstCancelWaiting)
 
 TEST (LockManager, Fairness)
 
LockManagergetGlobalLockManager ()
 Retrieves the global lock manager instance. More...
 
void reportGlobalLockingStats (SingleThreadedLockStats *outStats)
 Reports instance-wide locking statistics, which can then be converted to BSON or logged. More...
 
void resetGlobalLockStats ()
 Currently used for testing only. More...
 
 TEST (LockerImpl, LockNoConflict)
 
 TEST (LockerImpl, ReLockNoConflict)
 
 TEST (LockerImpl, ConflictWithTimeout)
 
 TEST (LockerImpl, ConflictUpgradeWithTimeout)
 
 TEST (LockerImpl, ReadTransaction)
 
 TEST (LockerImpl, saveAndRestoreGlobal)
 Test that saveMMAPV1LockerImpl works by examining the output. More...
 
 TEST (LockerImpl, saveAndRestoreGlobalAcquiredTwice)
 Test that we don't unlock when we have the global lock more than once. More...
 
 TEST (LockerImpl, saveAndRestoreDBAndCollection)
 Tests that restoreMMAPV1LockerImpl works by locking a db and collection and saving + restoring. More...
 
 TEST (LockerImpl, DefaultLocker)
 
 TEST (LockerImpl, MMAPV1Locker)
 
 TEST (LockerImpl, CanceledDeadlockUnblocks)
 
 TEST (LockerImpl, SharedLocksShouldTwoPhaseLockIsTrue)
 
 TEST (LockerImpl, ModeIXAndXLockParticipatesInTwoPhaseLocking)
 
 TEST (LockerImpl, OverrideLockRequestTimeout)
 
 TEST (LockerImpl, DoNotWaitForLockAcquisition)
 
 TEST (LockerImpl, GetLockerInfoShouldReportHeldLocks)
 
 TEST (LockerImpl, GetLockerInfoShouldReportPendingLocks)
 
 TEST (LockerImpl, ReaquireLockPendingUnlock)
 
 TEST (LockerImpl, AcquireLockPendingUnlockWithCoveredMode)
 
 TEST (LockerImpl, ConvertLockPendingUnlock)
 
 TEST (LockerImpl, ConvertLockPendingUnlockAndUnlock)
 
 TEST (LockStats, NoWait)
 
 TEST (LockStats, Wait)
 
 TEST (LockStats, Reporting)
 
template<typename F >
auto writeConflictRetry (OperationContext *opCtx, StringData opStr, StringData ns, F &&f)
 Runs the argument function f as many times as needed for f to complete or throw an exception other than WriteConflictException. More...
 
Status emptyCapped (OperationContext *opCtx, const NamespaceString &collectionName)
 Drops all documents contained in the capped collection, "collectionName". More...
 
Status cloneCollectionAsCapped (OperationContext *opCtx, Database *db, const std::string &shortFrom, const std::string &shortTo, long long size, bool temp)
 Clones the collection "shortFrom" to the capped collection "shortTo" with a size of "size". More...
 
Status convertToCapped (OperationContext *opCtx, const NamespaceString &collectionName, long long size)
 Converts the collection "collectionName" to a capped collection with a size of "size". More...
 
Status collMod (OperationContext *opCtx, const NamespaceString &ns, const BSONObj &cmdObj, BSONObjBuilder *result)
 Performs the collection modification described in "cmdObj" on the collection "ns". More...
 
Status collModWithUpgrade (OperationContext *opCtx, const NamespaceString &nss, const BSONObj &cmdObj)
 Applies the collMod operation and optionally updates formatVersion of unique indexes belonging to collection "nss". More...
 
Status collModForUUIDUpgrade (OperationContext *opCtx, const NamespaceString &nss, const BSONObj &cmdObj, CollectionUUID uuid)
 
void addCollectionUUIDs (OperationContext *opCtx)
 Adds UUIDs to all replicated collections of all databases if they do not already have UUIDs. More...
 
Status _updateNonReplicatedIndexPerCollection (OperationContext *opCtx, Collection *coll)
 
Status _updateNonReplicatedUniqueIndexesPerDatabase (OperationContext *opCtx, const std::string &dbName)
 
void _updateUniqueIndexesForDatabase (OperationContext *opCtx, const std::string &dbname)
 
void updateUniqueIndexesOnUpgrade (OperationContext *opCtx)
 
Status updateNonReplicatedUniqueIndexes (OperationContext *opCtx)
 
 MONGO_DEFINE_SHIM (Collection::makeImpl)
 
 MONGO_DEFINE_SHIM (Collection::parseValidationLevel)
 
 MONGO_DEFINE_SHIM (Collection::parseValidationAction)
 
ServerStatusMetricField< Counter64 > moveCounterDisplay ("record.moves", &moveCounter)
 
 MONGO_DEFINE_SHIM (CollectionInfoCache::makeImpl)
 
ExportedServerParameter< bool, ServerParameterType::kStartupOnly > createTimestampSafeUniqueIndexParameter (ServerParameterSet::getGlobal(), "createTimestampSafeUniqueIndex", &createTimestampSafeUniqueIndex)
 
void checkRoundTrip (const CollectionOptions &options1)
 
 TEST (CollectionOptions, SimpleRoundTrip)
 
 TEST (CollectionOptions, Validate)
 
 TEST (CollectionOptions, Validator)
 
 TEST (CollectionOptions, ErrorBadSize)
 
 TEST (CollectionOptions, ErrorBadMax)
 
 TEST (CollectionOptions, CappedSizeRoundsUpForAlignment)
 
 TEST (CollectionOptions, IgnoreSizeWrongType)
 
 TEST (CollectionOptions, IgnoreMaxWrongType)
 
 TEST (CollectionOptions, InvalidStorageEngineField)
 
 TEST (CollectionOptions, ParseEngineField)
 
 TEST (CollectionOptions, ResetStorageEngineField)
 
 TEST (CollectionOptions, ModifyStorageEngineField)
 
 TEST (CollectionOptions, FailToParseCollationThatIsNotAnObject)
 
 TEST (CollectionOptions, FailToParseCollationThatIsAnEmptyObject)
 
 TEST (CollectionOptions, CollationFieldParsesCorrectly)
 
 TEST (CollectionOptions, ParsedCollationObjShouldBeOwned)
 
 TEST (CollectionOptions, ResetClearsCollationField)
 
 TEST (CollectionOptions, CollationFieldLeftEmptyWhenOmitted)
 
 TEST (CollectionOptions, CollationFieldNotDumpedToBSONWhenOmitted)
 
 TEST (CollectionOptions, ViewParsesCorrectly)
 
 TEST (CollectionOptions, ViewParsesCorrectlyWithoutPipeline)
 
 TEST (CollectionOptions, PipelineFieldRequiresViewOn)
 
 TEST (CollectionOptions, UnknownTopLevelOptionFailsToParse)
 
 TEST (CollectionOptions, CreateOptionIgnoredIfFirst)
 
 TEST (CollectionOptions, CreateOptionIgnoredIfNotFirst)
 
 TEST (CollectionOptions, UnknownOptionIgnoredIfCreateOptionFirst)
 
 TEST (CollectionOptions, UnknownOptionIgnoredIfCreateOptionPresent)
 
 TEST (CollectionOptions, UnknownOptionRejectedIfCreateOptionNotPresent)
 
 TEST (CollectionOptions, DuplicateCreateOptionIgnoredIfCreateOptionFirst)
 
 TEST (CollectionOptions, DuplicateCreateOptionIgnoredIfCreateOptionNotFirst)
 
 TEST (CollectionOptions, MaxTimeMSWhitelistedOptionIgnored)
 
 TEST (CollectionOptions, WriteConcernWhitelistedOptionIgnored)
 
 TEST (CollectionOptions, ParseUUID)
 
Status createCollection (OperationContext *opCtx, const std::string &dbName, const BSONObj &cmdObj, const BSONObj &idIndex=BSONObj())
 Creates a collection as described in "cmdObj" on the database "dbName". More...
 
Status createCollectionForApplyOps (OperationContext *opCtx, const std::string &dbName, const BSONElement &ui, const BSONObj &cmdObj, const BSONObj &idIndex=BSONObj())
 As above, but only used by replication to apply operations. More...
 
 MONGO_DEFINE_SHIM (Database::makeImpl)
 
 MONGO_DEFINE_SHIM (Database::dropDatabase)
 
 MONGO_DEFINE_SHIM (Database::userCreateNS)
 
 MONGO_DEFINE_SHIM (Database::dropAllDatabasesExceptLocal)
 
 MONGO_DEFINE_SHIM (DatabaseHolder::makeImpl)
 
 MONGO_DEFINE_SHIM (DatabaseHolder::getDatabaseHolder)
 
void uassertNamespaceNotIndex (StringData ns, StringData caller)
 
 LOG (1)<< "create collection "<< ns<< ' '<< options
 
 if (!status.isOK()) return status
 
 if (!collectionOptions.collation.isEmpty())
 
 if (!collectionOptions.validator.isEmpty())
 
 if (auto indexOptions=collectionOptions.indexOptionDefaults["storageEngine"])
 
 if (collectionOptions.isView())
 
void dropAllDatabasesExceptLocalImpl (OperationContext *opCtx)
 
StringData bypassDocumentValidationCommandOption ()
 
bool shouldBypassDocumentValidationForCommand (const BSONObj &cmdObj)
 
Status dropCollection (OperationContext *opCtx, const NamespaceString &collectionName, BSONObjBuilder &result, const repl::OpTime &dropOpTime, DropCollectionSystemCollectionMode systemCollectionMode)
 
 MONGO_FAIL_POINT_DEFINE (dropDatabaseHangAfterLastCollectionDrop)
 
Status dropDatabase (OperationContext *opCtx, const std::string &dbName)
 Drops the database "dbName". More...
 
Status dropIndexes (OperationContext *opCtx, const NamespaceString &nss, const BSONObj &idxDescriptor, BSONObjBuilder *result)
 Drops the index from collection "nss" that matches the "idxDescriptor" and populates "result" with some statistics about the dropped index. More...
 
 MONGO_DEFINE_SHIM (IndexCatalog::makeImpl)
 
 MONGO_DEFINE_SHIM (IndexCatalog::IndexIterator::makeImpl)
 
 MONGO_DEFINE_SHIM (IndexCatalog::fixIndexKey)
 
 MONGO_DEFINE_SHIM (IndexCatalog::prepareInsertDeleteOptions)
 
 MONGO_DEFINE_SHIM (IndexCatalogEntry::makeImpl)
 
 MONGO_DEFINE_SHIM (MultiIndexBlock::makeImpl)
 
 MONGO_FAIL_POINT_DEFINE (crashAfterStartingIndexBuild)
 
 MONGO_FAIL_POINT_DEFINE (hangAfterStartingIndexBuild)
 
 MONGO_FAIL_POINT_DEFINE (hangAfterStartingIndexBuildUnlocked)
 
 MONGO_FAIL_POINT_DEFINE (slowBackgroundIndexBuild)
 
AtomicInt32 maxIndexBuildMemoryUsageMegabytes (500)
 
 MONGO_EXPORT_STARTUP_SERVER_PARAMETER (debugCollectionUUIDs, bool, false)
 
Status renameCollection (OperationContext *opCtx, const NamespaceString &source, const NamespaceString &target, const RenameCollectionOptions &options)
 
Status renameCollectionForApplyOps (OperationContext *opCtx, const std::string &dbName, const BSONElement &ui, const BSONObj &cmd, const repl::OpTime &renameOpTime)
 As above, but may only be called from applyCommand_inlock. More...
 
Status renameCollectionForRollback (OperationContext *opCtx, const NamespaceString &target, const UUID &uuid)
 Same as renameCollection(), but used for rolling back renameCollection operations only. More...
 
std::size_t partitionOf (const char x, const std::size_t nPartitions)
 
std::size_t partitionOf (const unsigned char x, const std::size_t nPartitions)
 
std::size_t partitionOf (const signed char x, const std::size_t nPartitions)
 
std::size_t partitionOf (const int x, const std::size_t nPartitions)
 
std::size_t partitionOf (const unsigned int x, const std::size_t nPartitions)
 
std::size_t partitionOf (const short x, const std::size_t nPartitions)
 
std::size_t partitionOf (const unsigned short x, const std::size_t nPartitions)
 
std::size_t partitionOf (const long x, const std::size_t nPartitions)
 
std::size_t partitionOf (const unsigned long x, const std::size_t nPartitions)
 
std::size_t partitionOf (const long long x, const std::size_t nPartitions)
 
std::size_t partitionOf (const unsigned long long x, const std::size_t nPartitions)
 
std::size_t partitionOf (const wchar_t x, const std::size_t nPartitions)
 
std::size_t partitionOf (const char16_t x, const std::size_t nPartitions)
 
std::size_t partitionOf (const char32_t x, const std::size_t nPartitions)
 

Variables

InitializerContext * context
 
int nDumped = 0
 
const int OldBucketSize = 8192
 
const Ordering nullOrdering = Ordering::make(BSONObj())
 
const unsigned BinDataLenMask = 0xf0
 
const unsigned BinDataTypeMask
 
const int BinDataLenMax = 32
 
const int BinDataLengthToCode []
 
const int BinDataCodeToLength [] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 32}
 
static unsigned sizes []
 
mongo::CmpUnitTest cunittest
 
mongo::IndexUpdateTest iu_unittest
 
DataFileSync dataFileSync
 
mongo::MemJournalServerStatusMetric memJournalServerStatusMetric
 
PointerToDurableMappedFile privateViews
 
static SimpleMutex _uniqueNumberMutex
 
static const int kNeedsFetchFailFreq = 2
 
static Counter64 needsFetchFailCounter
 
volatile int __record_touch_dummy = 1
 
MMAPV1Options mmapv1GlobalOptions
 Copyright (C) 2017 MongoDB Inc. More...
 
stdx::mutex mapViewMutex
 
const unsigned long long memoryMappedFileLocationFloor = 256LL * 1024LL * 1024LL * 1024LL
 
static unsigned long long _nextMemoryMappedFileLocation = memoryMappedFileLocationFloor
 
static SimpleMutex _nextMemoryMappedFileLocationMutex
 
static Counter64 freelistAllocs
 
static Counter64 freelistBucketExhausted
 
static Counter64 freelistIterations
 
char _touch_pages_char_reader
 
int inc = 0
 
const BSONObj key0 = BSON("" << 0)
 
const BSONObj key1 = BSON("" << 1)
 
const BSONObj key2 = BSON("" << 2)
 
const BSONObj key3 = BSON("" << 3)
 
const BSONObj key4 = BSON("" << 4)
 
const BSONObj key5 = BSON("" << 5)
 
const BSONObj key6 = BSON("" << 6)
 
const BSONObj compoundKey1a
 
const BSONObj compoundKey1b
 
const BSONObj compoundKey1c
 
const BSONObj compoundKey1d
 
const BSONObj compoundKey2a
 
const BSONObj compoundKey2b
 
const BSONObj compoundKey2c
 
const BSONObj compoundKey3a
 
const BSONObj compoundKey3b
 
const BSONObj compoundKey3c
 
bool _supportsDocLocking
 A RAII object that temporarily forces setting of the _supportsDocLocking global variable (defined in db/service_context.cpp and returned by mongo::supportsDocLocking()) for testing purposes. More...
 
StorageGlobalParams storageGlobalParams
 
WiredTigerGlobalOptions wiredTigerGlobalOptions
 
const int kDataFormatV1KeyStringV0IndexVersionV1 = 6
 
const int kDataFormatV2KeyStringV1IndexVersionV2 = 8
 
const int kDataFormatV3KeyStringV0UniqueIndexVersionV1 = 9
 
const int kDataFormatV4KeyStringV1UniqueIndexVersionV2 = 10
 
const int kMinimumIndexVersion = kDataFormatV1KeyStringV0IndexVersionV1
 
const int kMaximumIndexVersion = kDataFormatV4KeyStringV1UniqueIndexVersionV2
 
const std::string kWiredTigerEngineName = "wiredTiger"
 
static int kCappedDocumentRemoveLimit = 3
 
const ResourceId resourceIdLocalDB = ResourceId(RESOURCE_DATABASE, StringData("local"))
 
const ResourceId resourceIdOplog = ResourceId(RESOURCE_COLLECTION, StringData("local.oplog.rs"))
 
const ResourceId resourceIdAdminDB = ResourceId(RESOURCE_DATABASE, StringData("admin"))
 
const ResourceId resourceIdParallelBatchWriterMode
 
Collection *const _this
 
Collection *const OperationContext *const opCtx
 
Collection *const OperationContext *const const StringData fullNS
 
Collection *const OperationContext *const const StringData OptionalCollectionUUID uuid
 
Collection *const OperationContext *const const StringData OptionalCollectionUUID CollectionCatalogEntry *const details
 
Collection *const OperationContext *const const StringData OptionalCollectionUUID CollectionCatalogEntry *const RecordStore *const recordStore
 
Collection *const OperationContext *const const StringData OptionalCollectionUUID CollectionCatalogEntry *const RecordStore *const DatabaseCatalogEntry *const dbce
 
Counter64 moveCounter
 
Collection *const collection = db->getCollection(opCtx, ns)
 
Collection *const const NamespaceString & ns
 
bool createTimestampSafeUniqueIndex = false
 
Database *const this_
 
Database *const OperationContext *const const StringData name
 
Database *const OperationContext *const const StringData DatabaseCatalogEntry *const dbEntry
 
OperationContext Databasedb
 
OperationContext Database StringData BSONObj options
 
OperationContext Database StringData BSONObj CollectionOptions::ParseKind parseKind
 
OperationContext Database StringData BSONObj CollectionOptions::ParseKind bool createDefaultIndexes
 
OperationContext Database StringData BSONObj CollectionOptions::ParseKind bool const BSONObj &idIndex Status
 
if(collection) return Status(ErrorCodes if(db->getViewCatalog() ->lookup(opCtx, ns)) return Status(ErrorCodes CollectionOptions collectionOptions
 
Status status = collectionOptions.parse(options, parseKind)
 
std::unique_ptr< CollatorInterface > collator
 
 else
 
const OperationContext::Decoration< bool > documentValidationDisabled
 If true, Collection should do no validation of writes from this OperationContext. More...
 
IndexCatalogEntry *const OperationContext *const const StringData CollectionCatalogEntry *const std::unique_ptr< IndexDescriptor > descriptor
 
IndexCatalogEntry *const OperationContext *const const StringData CollectionCatalogEntry *const std::unique_ptr< IndexDescriptor > CollectionInfoCache *const infoCache
 
IndexCatalog *const Collection *const const int maxNumIndexesAllowed
 
OperationContext *const const IndexCatalog *const cat
 
OperationContext *const const IndexCatalog *const const bool includeUnfinishedIndexes
 
OperationContext const IndexDescriptor * desc
 
OperationContext const IndexDescriptor InsertDeleteOptions *options void
 
static const int INDEX_CATALOG_INIT = 283711
 
static const int INDEX_CATALOG_UNINIT = 654321
 
mongo::ExportedMaxIndexBuildMemoryUsageParameter exportedMaxIndexBuildMemoryUsageParameter
 
bool debugCollectionUUIDs
 

Detailed Description

Copyright (C) 2014 MongoDB Inc.

Copyright 2016 MongoDB Inc.

Copyright 2015 MongoDB Inc.

Copyright (C) 2017 10gen Inc.

Copyright (C) 2008-2014 MongoDB Inc.

Copyright (C) 2018 MongoDB Inc.

Copyright (C) 2014 10gen Inc.

Copyright (C) 2013-2014 MongoDB Inc.

posix

Copyright (C) 2009 10gen Inc.

Copyright (C) 2010 10gen Inc.

Copyright (C) 2012 10gen Inc.

Copyright (C) 2013 10gen Inc.

Copyright (C) 2008 10gen Inc.

Copyright (C) 2011 10gen Inc.

Copyright (C) 2014 MongoDB.

Copyright (C) 2009-2014 MongoDB Inc.

Copyright 2014 MongoDB Inc.

Copyright (C) 2016 MongoDB Inc.

Copyright (C) 2017 MongoDB Inc.

Copyright (C) 2015 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.

Typedef Documentation

◆ AtomicLockStats

typedef LockStats<AtomicInt64> mongo::AtomicLockStats

◆ CollectionUUID

typedef UUID mongo::CollectionUUID

A CollectionUUID is a 128-bit unique identifier, per RFC 4122, v4.

This class comprises a UUID to collection catalog, allowing for efficient collection lookup by UUID.

This class comprises the NamespaceString to UUID cache that prevents given namespaces from resolving to multiple UUIDs.

for a database collection. Newly created collections are assigned a new randomly generated CollectionUUID. In a replica-set or a sharded cluster, all nodes will use the same UUID for a given collection. The UUID stays with the collection until it is dropped, so even across renames. A copied collection must have its own new unique UUID though.

◆ DefaultLockerImpl

◆ HANDLE

typedef int mongo::HANDLE

◆ IndexVersion

typedef IndexDescriptor::IndexVersion mongo::IndexVersion

◆ KVDatabaseCatalogEntryFactory

◆ LockerId

typedef uint64_t mongo::LockerId

◆ MMAPV1LockerImpl

◆ OptionalCollectionUUID

using mongo::OptionalCollectionUUID = typedef boost::optional<CollectionUUID>

◆ Path

typedef boost::filesystem::path mongo::Path

◆ SingleThreadedLockStats

◆ TestFastMapNoAlloc

◆ UniqueWiredTigerSession

A unique handle type for WiredTigerSession pointers obtained from a WiredTigerSessionCache.

Enumeration Type Documentation

◆ BehaviorIfFieldIsEqual

Enumerator
normal 
less 
greater 

◆ CanonicalsEtc

Enumerator
cminkey 
cnull 
cdouble 
cstring 
cbindata 
coid 
cfalse 
ctrue 
cdate 
cmaxkey 
cCANONTYPEMASK 
cY 
cint 
cX 
clong 
cHASMORE 
cNOTUSED 

◆ DropCollectionSystemCollectionMode

Drops the collection "collectionName" and populates "result" with statistics about what was removed.

If we are applying an oplog entry for a collection drop on a secondary, 'dropOpTime' is set to the optime in the oplog entry.

Enumerator
kDisallowSystemCollectionDrops 
kAllowSystemCollectionDrops 

◆ Flags

Enumerator
Packed 

◆ LockMode

Lock modes.

Compatibility Matrix Granted mode ------------—.-----------------------------------------------------—. Requested Mode | MODE_NONE MODE_IS MODE_IX MODE_S MODE_X | MODE_IS | + + + + - | MODE_IX | + + + - - | MODE_S | + + - + - | MODE_X | + - - - - |

Enumerator
MODE_NONE 
MODE_IS 
MODE_IX 
MODE_S 
MODE_X 
LockModesCount 

◆ LockResult

Return values for the locking functions of the lock manager.

Enumerator
LOCK_OK 

The lock request was granted and is now on the granted list for the specified resource.

LOCK_WAITING 

The lock request was not granted because of conflict.

If this value is returned, the request was placed on the conflict queue of the specified resource and a call to the LockGrantNotification::notify callback should be expected with the resource whose lock was requested.

LOCK_TIMEOUT 

The lock request waited, but timed out before it could be granted.

This value is never returned by the LockManager methods here, but by the Locker class, which offers capability to block while waiting for locks.

LOCK_DEADLOCK 

The lock request was not granted because it would result in a deadlock.

No changes to the state of the Locker would be made if this value is returned (i.e., it will not be killed due to deadlock). It is up to the caller to decide how to recover from this return value - could be either release some locks and try again, or just bail with an error and have some upper code handle it.

LOCK_INVALID 

This is used as an initializer value.

Should never be returned.

◆ ResourceType

Hierarchy of resource types.

The lock manager knows nothing about this hierarchy, it is purely logical. Resources of different types will never conflict with each other.

While the lock manager does not know or care about ordering, the general policy is that resources are acquired in the order below. For example, one might first acquire a RESOURCE_GLOBAL and then the desired RESOURCE_DATABASE, both using intent modes, and finally a RESOURCE_COLLECTION in exclusive mode. When locking multiple resources of the same type, the canonical order is by resourceId order.

It is OK to lock resources out of order, but it is the users responsibility to ensure ordering is consistent so deadlock cannot occur.

Enumerator
RESOURCE_INVALID 
RESOURCE_GLOBAL 
RESOURCE_MMAPV1_FLUSH 
RESOURCE_DATABASE 
RESOURCE_COLLECTION 
RESOURCE_METADATA 
RESOURCE_MUTEX 
ResourceTypesCount 

◆ ValidateCmdLevel

Enumerator
kValidateIndex 
kValidateRecordStore 
kValidateFull 

◆ ValidationOperation

The ValidationOperation is used by classes using the IndexObserver to let us know what operation was associated with it.

The UPDATE operation can be seen as two independent operations (REMOVE operation followed by an INSERT operation).

Enumerator
INSERT 
REMOVE 

◆ ValidationStage

The ValidationStage allows the IndexConsistency class to perform the correct operations that depend on where we are in the validation.

Enumerator
DOCUMENT 
INDEX 
NONE 

Function Documentation

◆ _applyOpToDataFiles()

void mongo::_applyOpToDataFiles ( const string &  database,
FileOp fo,
bool  afterAllocator = false,
const string &  path = storageGlobalParams.dbpath 
)

◆ _checkQuota()

void mongo::_checkQuota ( bool  enforceQuota,
int  fileNo 
)

◆ _deleteDataFiles()

void mongo::_deleteDataFiles ( const std::string &  database)

◆ _renameForBackup()

void mongo::_renameForBackup ( const std::string &  database,
const Path reservedPath 
)

◆ _replaceWithRecovered()

void mongo::_replaceWithRecovered ( const string &  database,
const char *  reservedPathString 
)

◆ _updateNonReplicatedIndexPerCollection()

Status mongo::_updateNonReplicatedIndexPerCollection ( OperationContext *  opCtx,
Collection coll 
)

◆ _updateNonReplicatedUniqueIndexesPerDatabase()

Status mongo::_updateNonReplicatedUniqueIndexesPerDatabase ( OperationContext *  opCtx,
const std::string &  dbName 
)

◆ _updateUniqueIndexesForDatabase()

void mongo::_updateUniqueIndexesForDatabase ( OperationContext *  opCtx,
const std::string &  dbname 
)

◆ addCollectionUUIDs()

void mongo::addCollectionUUIDs ( OperationContext *  opCtx)

Adds UUIDs to all replicated collections of all databases if they do not already have UUIDs.

If this function is not necessary for SERVER-33247, it can be removed.

◆ AlignNumber()

unsigned long long mongo::AlignNumber ( unsigned long long  number,
unsigned long long  granularity 
)

◆ appendStorageEngineList()

void mongo::appendStorageEngineList ( ServiceContext *  service,
BSONObjBuilder *  result 
)

◆ assertStateV1RS()

void mongo::assertStateV1RS ( OperationContext *  opCtx,
const LocAndSize records,
const LocAndSize drecs,
const LocAndSize legacyGrabBag,
const ExtentManager em,
const DummyRecordStoreV1MetaData md 
)

Asserts that the V1RecordStore defined by md has the passed in records and drecs in the correct order.

List of LocAndSize are terminated by a Null DiskLoc. Passing a NULL pointer means don't check that list.

◆ bigNumString()

std::string mongo::bigNumString ( long long  n,
int  len 
)

Generates a string of the specified length containing repeated concatenation of the hexadecimal representation of the input value.

◆ binDataCodeToLength()

int mongo::binDataCodeToLength ( int  codeByte)

◆ boostRenameWrapper()

void mongo::boostRenameWrapper ( const Path from,
const Path to 
)

◆ bypassDocumentValidationCommandOption()

StringData mongo::bypassDocumentValidationCommandOption ( )
inline

◆ checkConflict()

static void mongo::checkConflict ( LockMode  existingMode,
LockMode  newMode,
bool  hasConflict 
)
static

◆ checkRoundTrip()

void mongo::checkRoundTrip ( const CollectionOptions options1)

◆ checkStatus()

void mongo::checkStatus ( int  retStatus,
int  desiredStatus,
const char *  fnName,
const char *  errMsg 
)

Checks if retStatus == desiredStatus; else calls fassert.

◆ cloneCollectionAsCapped()

mongo::Status mongo::cloneCollectionAsCapped ( OperationContext *  opCtx,
Database db,
const std::string &  shortFrom,
const std::string &  shortTo,
long long  size,
bool  temp 
)

Clones the collection "shortFrom" to the capped collection "shortTo" with a size of "size".

◆ collMod()

Status mongo::collMod ( OperationContext *  opCtx,
const NamespaceString &  nss,
const BSONObj &  cmdObj,
BSONObjBuilder *  result 
)

Performs the collection modification described in "cmdObj" on the collection "ns".

◆ collModForUUIDUpgrade()

Status mongo::collModForUUIDUpgrade ( OperationContext *  opCtx,
const NamespaceString &  nss,
const BSONObj &  cmdObj,
CollectionUUID  uuid 
)

◆ collModWithUpgrade()

Status mongo::collModWithUpgrade ( OperationContext *  opCtx,
const NamespaceString &  nss,
const BSONObj &  cmdObj 
)

Applies the collMod operation and optionally updates formatVersion of unique indexes belonging to collection "nss".

◆ compare()

static int mongo::compare ( const unsigned char *&  l,
const unsigned char *&  r 
)
static

◆ compress()

size_t mongo::compress ( const char *  input,
size_t  input_length,
std::string *  output 
)

◆ convertToCapped()

mongo::Status mongo::convertToCapped ( OperationContext *  opCtx,
const NamespaceString &  collectionName,
long long  size 
)

Converts the collection "collectionName" to a capped collection with a size of "size".

◆ createCollection()

Status mongo::createCollection ( OperationContext *  opCtx,
const std::string &  dbName,
const BSONObj &  cmdObj,
const BSONObj &  idIndex = BSONObj() 
)

Creates a collection as described in "cmdObj" on the database "dbName".

Creates the collection's _id index according to 'idIndex', if it is non-empty. When 'idIndex' is empty, creates the default _id index.

◆ createCollectionForApplyOps()

Status mongo::createCollectionForApplyOps ( OperationContext *  opCtx,
const std::string &  dbName,
const BSONElement &  ui,
const BSONObj &  cmdObj,
const BSONObj &  idIndex = BSONObj() 
)

As above, but only used by replication to apply operations.

This allows recreating collections with specific UUIDs (if ui is given), and in that case will rename any existing collections with the same name and a UUID to a temporary name. If ui is not given, an existing collection will result in an error.

◆ createLockFile()

void mongo::createLockFile ( ServiceContext *  service)

Creates the lock file used to prevent concurrent processes from accessing the data files, as appropriate.

◆ createTimestampSafeUniqueIndexParameter()

ExportedServerParameter<bool, ServerParameterType::kStartupOnly> mongo::createTimestampSafeUniqueIndexParameter ( ServerParameterSet::getGlobal()  ,
"createTimestampSafeUniqueIndex"  ,
createTimestampSafeUniqueIndex 
)

◆ dataSyncFailedHandler()

void mongo::dataSyncFailedHandler ( )

◆ dbSize() [1/2]

intmax_t mongo::dbSize ( const string &  database)

◆ dbSize() [2/2]

intmax_t mongo::dbSize ( const std::string &  database)

◆ defaultDatabaseCatalogEntryFactory()

auto mongo::defaultDatabaseCatalogEntryFactory ( const StringData  name,
KVStorageEngine *const  engine 
)

◆ dFreelist1()

static ServerStatusMetricField<Counter64> mongo::dFreelist1 ( "storage.freelist.search.requests"  ,
freelistAllocs 
)
static

◆ dFreelist2()

static ServerStatusMetricField<Counter64> mongo::dFreelist2 ( "storage.freelist.search.bucketExhausted"  ,
freelistBucketExhausted 
)
static

◆ dFreelist3()

static ServerStatusMetricField<Counter64> mongo::dFreelist3 ( "storage.freelist.search.scanned"  ,
freelistIterations 
)
static

◆ doValidate()

void mongo::doValidate ( OperationContext *  opCtx,
ValidateResults results 
)

Checks if the database file is corrupt.

◆ dropAllDatabasesExceptLocalImpl()

void mongo::dropAllDatabasesExceptLocalImpl ( OperationContext *  opCtx)

◆ dropCollection()

Status mongo::dropCollection ( OperationContext *  opCtx,
const NamespaceString &  collectionName,
BSONObjBuilder &  result,
const repl::OpTime &  dropOpTime,
DropCollectionSystemCollectionMode  systemCollectionMode 
)

◆ dropDatabase()

Status mongo::dropDatabase ( OperationContext *  opCtx,
const std::string &  dbName 
)

Drops the database "dbName".

◆ dropIndexes()

Status mongo::dropIndexes ( OperationContext *  opCtx,
const NamespaceString &  nss,
const BSONObj &  idxDescriptor,
BSONObjBuilder *  result 
)

Drops the index from collection "nss" that matches the "idxDescriptor" and populates "result" with some statistics about the dropped index.

◆ dynamic_ptr_cast()

template<typename Target , typename Current >
std::unique_ptr<Target> mongo::dynamic_ptr_cast ( std::unique_ptr< Current > &&  p)

◆ emptyCapped()

mongo::Status mongo::emptyCapped ( OperationContext *  opCtx,
const NamespaceString &  collectionName 
)

Drops all documents contained in the capped collection, "collectionName".

◆ encryptionHooksInitializer()

GlobalInitializerRegisterer mongo::encryptionHooksInitializer ( "SetEncryptionHooks"  ,
{"ServiceContext"}  ,
[] (InitializerContext *context) { EncryptionHooks::set(getGlobalServiceContext(), stdx::make_unique< EncryptionHooks >());return Status::OK();}  ,
[] (DeinitializerContext *context) { EncryptionHooks::set(getGlobalServiceContext(), nullptr);return Status::OK();}   
)

◆ ensureParentDirCreated()

boost::filesystem::path mongo::ensureParentDirCreated ( const boost::filesystem::path &  p)

Aliases for Win32 CRT functions.

◆ flushMyDirectory()

void mongo::flushMyDirectory ( const boost::filesystem::path &  file)

◆ getDur()

dur::DurableInterface& mongo::getDur ( )
inline

Provides a reference to the active durability interface.

TODO: The only reason this is an inline function is that tests try to link it and fail if the MMAP V1 engine is not included.

◆ getEphemeralForTestBtreeImpl()

SortedDataInterface * mongo::getEphemeralForTestBtreeImpl ( const Ordering &  ordering,
bool  isUnique,
std::shared_ptr< void > *  dataInOut 
)

Caller takes ownership.

All permanent data will be stored and fetch from dataInOut.

◆ getFactoryForStorageEngine()

StorageEngine::Factory * mongo::getFactoryForStorageEngine ( ServiceContext *  context,
StringData  name 
)

Returns an unowned pointer to the factory for the named storage engine, or nullptr.

NOTE: Exposed only for use in legacy testing scenarios.

◆ getGlobalLockManager()

LockManager * mongo::getGlobalLockManager ( )

Retrieves the global lock manager instance.

◆ getMinOSPageSizeBytes()

std::size_t mongo::getMinOSPageSizeBytes ( )

◆ getMMAPV1Interface() [1/2]

SortedDataInterface* mongo::getMMAPV1Interface ( HeadManager headManager,
RecordStore recordStore,
SavedCursorRegistry cursorRegistry,
const Ordering &  ordering,
const std::string &  indexName,
IndexDescriptor::IndexVersion  version,
bool  isUnique 
)

◆ getMMAPV1Interface() [2/2]

SortedDataInterface* mongo::getMMAPV1Interface ( HeadManager headManager,
RecordStore recordStore,
SavedCursorRegistry cursorRegistry,
const Ordering &  ordering,
const string &  indexName,
IndexVersion  version,
bool  isUnique 
)

◆ getNextMemoryMappedFileLocation()

static void* mongo::getNextMemoryMappedFileLocation ( unsigned long long  mmfSize)
static

◆ getPartition()

dev_t mongo::getPartition ( const std::string &  path)

◆ if() [1/5]

mongo::if ( !status.  isOK())

◆ if() [2/5]

mongo::if ( !collectionOptions.collation.  isEmpty())

◆ if() [3/5]

mongo::if ( !collectionOptions.validator.  isEmpty())

◆ if() [4/5]

mongo::if ( auto  indexOptions = collectionOptions.indexOptionDefaults["storageEngine"])

◆ if() [5/5]

mongo::if ( collectionOptions.  isView())

◆ index_collator_customize()

int mongo::index_collator_customize ( WT_COLLATOR *  coll,
WT_SESSION *  s,
const char *  uri,
WT_CONFIG_ITEM *  metadata,
WT_COLLATOR **  collp 
)

◆ index_collator_extension()

MONGO_COMPILER_API_EXPORT int mongo::index_collator_extension ( WT_CONNECTION *  conn,
WT_CONFIG_ARG *  cfg 
)

◆ initializeStorageEngine()

void mongo::initializeStorageEngine ( ServiceContext *  service)

Initializes the storage engine on "service".

◆ initializeV1RS()

void mongo::initializeV1RS ( OperationContext *  opCtx,
const LocAndSize records,
const LocAndSize drecs,
const LocAndSize legacyGrabBag,
DummyExtentManager em,
DummyRecordStoreV1MetaData md 
)

Creates a V1 storage/mmap_v1 with the passed in records and DeletedRecords (drecs).

List of LocAndSize are terminated by a Null DiskLoc. Passing a NULL pointer is shorthand for an empty list. Each extent gets it's own DiskLoc file number. DiskLoc Offsets must be > 1000.

records must be sorted by extent/file. offsets within an extent can be in any order.

In a simple RS, drecs must be grouped into size-buckets, but the ordering within the size buckets is up to you.

In a capped collection, all drecs form a single list and must be grouped by extent, with each extent having at least one drec. capFirstNewRecord() and capExtent() must be correctly set on md before calling.

You are responsible for ensuring the records and drecs don't overlap.

ExtentManager and MetaData must both be empty.

◆ insertToIndex() [1/2]

void mongo::insertToIndex ( unowned_ptr< OperationContext >  opCtx,
unowned_ptr< SortedDataInterface index,
std::initializer_list< IndexKeyEntry toInsert 
)

Inserts all entries in toInsert into index.

ASSERT_OKs the inserts. Always uses dupsAllowed=true.

Should be used for declaring and changing conditions, not for testing inserts.

◆ insertToIndex() [2/2]

void mongo::insertToIndex ( unowned_ptr< HarnessHelper harness,
unowned_ptr< SortedDataInterface index,
std::initializer_list< IndexKeyEntry toInsert 
)
inline

◆ isModeCovered()

bool mongo::isModeCovered ( LockMode  mode,
LockMode  coveringMode 
)

Mode A is covered by mode B if the set of conflicts for mode A is a subset of the set of conflicts for mode B.

For example S is covered by X. IS is covered by S. However, IX is not covered by S or IS.

◆ isRegisteredStorageEngine()

bool mongo::isRegisteredStorageEngine ( ServiceContext *  service,
StringData  name 
)

Returns true if "name" refers to a registered storage engine.

◆ isSharedLockMode()

bool mongo::isSharedLockMode ( LockMode  mode)
inline

Returns whether the passed in mode is S or IS.

Used for validation checks.

◆ kvDatabaseCatalogEntryMockFactory()

std::unique_ptr< mongo::KVDatabaseCatalogEntryMock > mongo::kvDatabaseCatalogEntryMockFactory ( StringData  name,
KVStorageEngine engine 
)

Copyright (C) 2016 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.

◆ kWiredTigerCursorCacheSize()

AtomicInt32 mongo::kWiredTigerCursorCacheSize ( 100)

◆ legacyModeName()

const char * mongo::legacyModeName ( LockMode  mode)

Legacy lock mode names in parity for 2.6 reports.

◆ loc1()

const RecordId mongo::loc1 ( ,
42   
)

◆ loc2()

const RecordId mongo::loc2 ( ,
44   
)

◆ loc3()

const RecordId mongo::loc3 ( ,
46   
)

◆ loc4()

const RecordId mongo::loc4 ( ,
48   
)

◆ loc5()

const RecordId mongo::loc5 ( ,
50   
)

◆ loc6()

const RecordId mongo::loc6 ( ,
52   
)

◆ loc7()

const RecordId mongo::loc7 ( ,
54   
)

◆ loc8()

const RecordId mongo::loc8 ( ,
56   
)

◆ lockRequestStatusName()

const char * mongo::lockRequestStatusName ( LockRequest::Status  status)

Returns a human readable status name for the specified LockRequest status.

◆ LOG()

mongo::LOG ( )

◆ makeHarnessHelper()

std::unique_ptr<HarnessHelper> mongo::makeHarnessHelper ( )

◆ maxCompressedLength()

size_t mongo::maxCompressedLength ( size_t  source_len)

◆ maxIndexBuildMemoryUsageMegabytes()

AtomicInt32 mongo::maxIndexBuildMemoryUsageMegabytes ( 500  )

◆ minOSPageSizeBytesTest()

void mongo::minOSPageSizeBytesTest ( size_t  minOSPageSizeBytes)

◆ mobileKVEngineInitializer()

GlobalInitializerRegisterer mongo::mobileKVEngineInitializer ( "MobileKVEngineInit"  ,
{"ServiceContext"}  ,
[] (InitializerContext *context) { registerStorageEngine(getGlobalServiceContext(), std::make_unique< MobileFactory >());return Status::OK();}  ,
[] (DeinitializerContext *const) { return Status::OK();}   
)

◆ modeName()

const char * mongo::modeName ( LockMode  mode)

Returns a human-readable name for the specified lock mode.

◆ MONGO_DEFINE_SHIM() [1/16]

mongo::MONGO_DEFINE_SHIM ( CollectionInfoCache::makeImpl  )

◆ MONGO_DEFINE_SHIM() [2/16]

mongo::MONGO_DEFINE_SHIM ( Database::makeImpl  )

◆ MONGO_DEFINE_SHIM() [3/16]

mongo::MONGO_DEFINE_SHIM ( IndexCatalog::makeImpl  )

◆ MONGO_DEFINE_SHIM() [4/16]

mongo::MONGO_DEFINE_SHIM ( DatabaseHolder::makeImpl  )

◆ MONGO_DEFINE_SHIM() [5/16]

mongo::MONGO_DEFINE_SHIM ( IndexCatalogEntry::makeImpl  )

◆ MONGO_DEFINE_SHIM() [6/16]

mongo::MONGO_DEFINE_SHIM ( DatabaseHolder::getDatabaseHolder  )

◆ MONGO_DEFINE_SHIM() [7/16]

mongo::MONGO_DEFINE_SHIM ( Database::dropDatabase  )

◆ MONGO_DEFINE_SHIM() [8/16]

mongo::MONGO_DEFINE_SHIM ( Database::userCreateNS  )

◆ MONGO_DEFINE_SHIM() [9/16]

mongo::MONGO_DEFINE_SHIM ( Database::dropAllDatabasesExceptLocal  )

◆ MONGO_DEFINE_SHIM() [10/16]

mongo::MONGO_DEFINE_SHIM ( IndexCatalog::IndexIterator::makeImpl  )

◆ MONGO_DEFINE_SHIM() [11/16]

mongo::MONGO_DEFINE_SHIM ( IndexCatalog::fixIndexKey  )

◆ MONGO_DEFINE_SHIM() [12/16]

mongo::MONGO_DEFINE_SHIM ( MultiIndexBlock::makeImpl  )

◆ MONGO_DEFINE_SHIM() [13/16]

mongo::MONGO_DEFINE_SHIM ( IndexCatalog::prepareInsertDeleteOptions  )

◆ MONGO_DEFINE_SHIM() [14/16]

mongo::MONGO_DEFINE_SHIM ( Collection::makeImpl  )

◆ MONGO_DEFINE_SHIM() [15/16]

mongo::MONGO_DEFINE_SHIM ( Collection::parseValidationLevel  )

◆ MONGO_DEFINE_SHIM() [16/16]

mongo::MONGO_DEFINE_SHIM ( Collection::parseValidationAction  )

◆ MONGO_EXPORT_STARTUP_SERVER_PARAMETER()

mongo::MONGO_EXPORT_STARTUP_SERVER_PARAMETER ( debugCollectionUUIDs  ,
bool  ,
false   
)

◆ MONGO_FAIL_POINT_DECLARE() [1/4]

mongo::MONGO_FAIL_POINT_DECLARE ( WTPrepareConflictForReads  )

◆ MONGO_FAIL_POINT_DECLARE() [2/4]

mongo::MONGO_FAIL_POINT_DECLARE ( WTWriteConflictException  )

◆ MONGO_FAIL_POINT_DECLARE() [3/4]

mongo::MONGO_FAIL_POINT_DECLARE ( WTWriteConflictExceptionForReads  )

◆ MONGO_FAIL_POINT_DECLARE() [4/4]

mongo::MONGO_FAIL_POINT_DECLARE ( WTPausePrimaryOplogDurabilityLoop  )

◆ MONGO_FAIL_POINT_DEFINE() [1/11]

mongo::MONGO_FAIL_POINT_DEFINE ( WTPrepareConflictForReads  )

◆ MONGO_FAIL_POINT_DEFINE() [2/11]

mongo::MONGO_FAIL_POINT_DEFINE ( WTPausePrimaryOplogDurabilityLoop  )

◆ MONGO_FAIL_POINT_DEFINE() [3/11]

mongo::MONGO_FAIL_POINT_DEFINE ( dropDatabaseHangAfterLastCollectionDrop  )

◆ MONGO_FAIL_POINT_DEFINE() [4/11]

mongo::MONGO_FAIL_POINT_DEFINE ( crashAfterStartingIndexBuild  )

◆ MONGO_FAIL_POINT_DEFINE() [5/11]

mongo::MONGO_FAIL_POINT_DEFINE ( recordNeedsFetchFail  )

◆ MONGO_FAIL_POINT_DEFINE() [6/11]

mongo::MONGO_FAIL_POINT_DEFINE ( hangAfterStartingIndexBuild  )

◆ MONGO_FAIL_POINT_DEFINE() [7/11]

mongo::MONGO_FAIL_POINT_DEFINE ( hangAfterStartingIndexBuildUnlocked  )

◆ MONGO_FAIL_POINT_DEFINE() [8/11]

mongo::MONGO_FAIL_POINT_DEFINE ( slowBackgroundIndexBuild  )

◆ MONGO_FAIL_POINT_DEFINE() [9/11]

mongo::MONGO_FAIL_POINT_DEFINE ( allocateDiskFull  )

◆ MONGO_FAIL_POINT_DEFINE() [10/11]

mongo::MONGO_FAIL_POINT_DEFINE ( WTWriteConflictException  )

◆ MONGO_FAIL_POINT_DEFINE() [11/11]

mongo::MONGO_FAIL_POINT_DEFINE ( WTWriteConflictExceptionForReads  )

◆ MONGO_REGISTER_TEST_COMMAND()

mongo::MONGO_REGISTER_TEST_COMMAND ( JournalLatencyTestCmd  )

◆ MONGO_STATIC_ASSERT() [1/12]

◆ MONGO_STATIC_ASSERT() [2/12]

mongo::MONGO_STATIC_ASSERT ( sizeof(Extent) -  4 = =48+128)

◆ MONGO_STATIC_ASSERT() [3/12]

mongo::MONGO_STATIC_ASSERT ( sizeof(void *)  = =sizeof(size_t))

◆ MONGO_STATIC_ASSERT() [4/12]

mongo::MONGO_STATIC_ASSERT ( DataFileHeader::HeaderSize  = =8192)

◆ MONGO_STATIC_ASSERT() [5/12]

mongo::MONGO_STATIC_ASSERT ( sizeof(static_cast< DataFileHeader * >(NULL) ->data = =4)

◆ MONGO_STATIC_ASSERT() [6/12]

mongo::MONGO_STATIC_ASSERT ( sizeof(DataFileHeader) - sizeof(static_cast< DataFileHeader * >(NULL) ->data = =DataFileHeader::HeaderSize)

◆ MONGO_STATIC_ASSERT() [7/12]

mongo::MONGO_STATIC_ASSERT ( sizeof(RecordStoreV1Base::bucketSizes)/sizeof(RecordStoreV1Base::bucketSizes[0])  = =RecordStoreV1Base::Buckets)

◆ MONGO_STATIC_ASSERT() [8/12]

mongo::MONGO_STATIC_ASSERT ( 16  = =sizeof(DeletedRecord))

◆ MONGO_STATIC_ASSERT() [9/12]

mongo::MONGO_STATIC_ASSERT ( sizeof(BtreeBucketV0) - sizeof(static_cast< BtreeBucketV0 * >(NULL) ->data = =BtreeBucketV0::HeaderSize)

◆ MONGO_STATIC_ASSERT() [10/12]

mongo::MONGO_STATIC_ASSERT ( sizeof(ResourceId = =sizeof(uint64_t))

◆ MONGO_STATIC_ASSERT() [11/12]

mongo::MONGO_STATIC_ASSERT ( sizeof(NamespaceDetails = =496)

◆ MONGO_STATIC_ASSERT() [12/12]

mongo::MONGO_STATIC_ASSERT ( sizeof(BtreeBucketV1) - sizeof(static_cast< BtreeBucketV1 * >(NULL) ->data = =BtreeBucketV1::HeaderSize)

◆ moveCounterDisplay()

ServerStatusMetricField<Counter64> mongo::moveCounterDisplay ( "record.moves"  ,
moveCounter 
)

◆ newHarnessHelper()

auto mongo::newHarnessHelper ( )

◆ newRecordStoreHarnessHelper()

std::unique_ptr<RecordStoreHarnessHelper> mongo::newRecordStoreHarnessHelper ( )
inline

◆ newRecoveryUnitHarnessHelper()

std::unique_ptr<RecoveryUnitHarnessHelper> mongo::newRecoveryUnitHarnessHelper ( )
inline

◆ newSortedDataInterfaceHarnessHelper()

std::unique_ptr<SortedDataInterfaceHarnessHelper> mongo::newSortedDataInterfaceHarnessHelper ( )
inline

◆ oldCompare()

int mongo::oldCompare ( const BSONObj &  l,
const BSONObj &  r,
const Ordering &  o 
)

◆ oldCompareElementValues()

int mongo::oldCompareElementValues ( const BSONElement &  l,
const BSONElement &  r 
)

◆ oldElemCompare()

int mongo::oldElemCompare ( const BSONElement &  l,
const BSONElement &  r 
)

◆ onSamePartition()

bool mongo::onSamePartition ( const std::string &  path1,
const std::string &  path2 
)
inline

◆ operator!=() [1/2]

bool mongo::operator!= ( const IndexKeyEntry lhs,
const IndexKeyEntry rhs 
)
inline

◆ operator!=() [2/2]

bool mongo::operator!= ( const KeyString lhs,
const KeyString rhs 
)
inline

◆ operator<() [1/2]

bool mongo::operator< ( const DiskLoc rhs,
const DiskLoc lhs 
)
inline

◆ operator<() [2/2]

bool mongo::operator< ( const KeyString lhs,
const KeyString rhs 
)
inline

◆ operator<<() [1/4]

std::ostream & mongo::operator<< ( std::ostream &  stream,
const IndexKeyEntry entry 
)

◆ operator<<() [2/4]

std::ostream& mongo::operator<< ( std::ostream &  s,
const KVPrefix prefix 
)
inline

◆ operator<<() [3/4]

std::ostream& mongo::operator<< ( std::ostream &  stream,
const DiskLoc loc 
)
inline

◆ operator<<() [4/4]

std::ostream& mongo::operator<< ( std::ostream &  stream,
const KeyString value 
)
inline

◆ operator<=() [1/2]

bool mongo::operator<= ( const DiskLoc rhs,
const DiskLoc lhs 
)
inline

◆ operator<=() [2/2]

bool mongo::operator<= ( const KeyString lhs,
const KeyString rhs 
)
inline

◆ operator==() [1/2]

bool mongo::operator== ( const IndexKeyEntry lhs,
const IndexKeyEntry rhs 
)
inline

◆ operator==() [2/2]

bool mongo::operator== ( const KeyString lhs,
const KeyString rhs 
)
inline

◆ operator>() [1/2]

bool mongo::operator> ( const DiskLoc rhs,
const DiskLoc lhs 
)
inline

◆ operator>() [2/2]

bool mongo::operator> ( const KeyString lhs,
const KeyString rhs 
)
inline

◆ operator>=() [1/2]

bool mongo::operator>= ( const DiskLoc rhs,
const DiskLoc lhs 
)
inline

◆ operator>=() [2/2]

bool mongo::operator>= ( const KeyString lhs,
const KeyString rhs 
)
inline

◆ partitionOf() [1/14]

std::size_t mongo::partitionOf ( const char  x,
const std::size_t  nPartitions 
)
inline

◆ partitionOf() [2/14]

std::size_t mongo::partitionOf ( const unsigned char  x,
const std::size_t  nPartitions 
)
inline

◆ partitionOf() [3/14]

std::size_t mongo::partitionOf ( const signed char  x,
const std::size_t  nPartitions 
)
inline

◆ partitionOf() [4/14]

std::size_t mongo::partitionOf ( const int  x,
const std::size_t  nPartitions 
)
inline

◆ partitionOf() [5/14]

std::size_t mongo::partitionOf ( const unsigned int  x,
const std::size_t  nPartitions 
)
inline

◆ partitionOf() [6/14]

std::size_t mongo::partitionOf ( const short  x,
const std::size_t  nPartitions 
)
inline

◆ partitionOf() [7/14]

std::size_t mongo::partitionOf ( const unsigned short  x,
const std::size_t  nPartitions 
)
inline

◆ partitionOf() [8/14]

std::size_t mongo::partitionOf ( const long  x,
const std::size_t  nPartitions 
)
inline

◆ partitionOf() [9/14]

std::size_t mongo::partitionOf ( const unsigned long  x,
const std::size_t  nPartitions 
)
inline

◆ partitionOf() [10/14]

std::size_t mongo::partitionOf ( const long long  x,
const std::size_t  nPartitions 
)
inline

◆ partitionOf() [11/14]

std::size_t mongo::partitionOf ( const unsigned long long  x,
const std::size_t  nPartitions 
)
inline

◆ partitionOf() [12/14]

std::size_t mongo::partitionOf ( const wchar_t  x,
const std::size_t  nPartitions 
)
inline

◆ partitionOf() [13/14]

std::size_t mongo::partitionOf ( const char16_t  x,
const std::size_t  nPartitions 
)
inline

◆ partitionOf() [14/14]

std::size_t mongo::partitionOf ( const char32_t  x,
const std::size_t  nPartitions 
)
inline

◆ rawCompress()

void mongo::rawCompress ( const char *  input,
size_t  input_length,
char *  compressed,
size_t *  compressed_length 
)

◆ RegisterHarnessFactory()

MONGO_INITIALIZER() mongo::RegisterHarnessFactory ( InitializerContext *  const)

◆ registerHarnessHelperFactory()

void mongo::registerHarnessHelperFactory ( stdx::function< std::unique_ptr< HarnessHelper >()>  factory)

◆ registerStorageEngine()

void mongo::registerStorageEngine ( ServiceContext *  service,
std::unique_ptr< StorageEngine::Factory factory 
)

Registers a storage engine onto the given "service".

◆ removeAndSlideBit()

unsigned long long mongo::removeAndSlideBit ( unsigned long long  b,
int  x 
)

◆ removeFromIndex() [1/2]

void mongo::removeFromIndex ( unowned_ptr< OperationContext >  opCtx,
unowned_ptr< SortedDataInterface index,
std::initializer_list< IndexKeyEntry toRemove 
)

Removes all entries in toRemove from index.

Always uses dupsAllowed=true.

Should be used for declaring and changing conditions, not for testing removes.

◆ removeFromIndex() [2/2]

void mongo::removeFromIndex ( unowned_ptr< HarnessHelper harness,
unowned_ptr< SortedDataInterface index,
std::initializer_list< IndexKeyEntry toRemove 
)
inline

◆ renameCollection()

Status mongo::renameCollection ( OperationContext *  opCtx,
const NamespaceString &  source,
const NamespaceString &  target,
const RenameCollectionOptions options 
)

◆ renameCollectionForApplyOps()

Status mongo::renameCollectionForApplyOps ( OperationContext *  opCtx,
const std::string &  dbName,
const BSONElement &  ui,
const BSONObj &  cmd,
const repl::OpTime &  renameOpTime 
)

As above, but may only be called from applyCommand_inlock.

This allows creating a collection with a specific UUID for cross-database renames.

When 'cmd' contains dropTarget=true, 'renameOpTime' is used to rename the target collection to a drop-pending collection.

◆ renameCollectionForRollback()

Status mongo::renameCollectionForRollback ( OperationContext *  opCtx,
const NamespaceString &  target,
const UUID &  uuid 
)

Same as renameCollection(), but used for rolling back renameCollection operations only.

'uuid' is used to look up the source namespace. The 'target' namespace must refer to the same database as the source.

◆ repairDatabaseMmapv1()

Status mongo::repairDatabaseMmapv1 ( StorageEngine engine,
OperationContext *  opCtx,
const std::string &  dbName,
bool  preserveClonedFilesOnFailure,
bool  backupOriginalFiles 
)

◆ RepairDatabaseMMapV1()

MONGO_INITIALIZER() mongo::RepairDatabaseMMapV1 ( InitializerContext *  context)

◆ reportGlobalLockingStats()

void mongo::reportGlobalLockingStats ( SingleThreadedLockStats outStats)

Reports instance-wide locking statistics, which can then be converted to BSON or logged.

◆ resetGlobalLockStats()

void mongo::resetGlobalLockStats ( )

Currently used for testing only.

◆ resourceTypeName()

const char * mongo::resourceTypeName ( ResourceType  resourceType)

Returns a human-readable name for the specified resource type.

◆ setRepairDatabaseMmapv1Impl() [1/2]

void mongo::setRepairDatabaseMmapv1Impl ( stdx::function< Status(StorageEngine *engine, OperationContext *, const std::string &, bool, bool)>  impl)

◆ setRepairDatabaseMmapv1Impl() [2/2]

void mongo::setRepairDatabaseMmapv1Impl ( stdx::function< Status(StorageEngine *, OperationContext *, std::string const &, bool, bool)>  impl)

◆ shouldBypassDocumentValidationForCommand()

bool mongo::shouldBypassDocumentValidationForCommand ( const BSONObj &  cmdObj)
inline

◆ shutdownGlobalStorageEngineCleanly()

void mongo::shutdownGlobalStorageEngineCleanly ( ServiceContext *  service)

Shuts down storage engine cleanly and releases any locks on mongod.lock.

◆ simpleKey()

BSONObj mongo::simpleKey ( char  c,
int  n 
)

Generates key on a field 'a', with the specified number of repetitions of the character.

◆ sizeOfElement()

unsigned mongo::sizeOfElement ( const unsigned char *  p)
inline

◆ sqliteRCToStatus()

Status mongo::sqliteRCToStatus ( int  retCode,
const char *  prefix 
)

Converts SQLite return codes to MongoDB statuses.

◆ SUITE_V0()

static unittest::SuiteInstance<BtreeLogicTestSuite<BtreeLayoutV0> > mongo::SUITE_V0 ( "BTreeLogicTests_V0"  )
static

◆ SUITE_V1()

static unittest::SuiteInstance<BtreeLogicTestSuite<BtreeLayoutV1> > mongo::SUITE_V1 ( "BTreeLogicTests_V1"  )
static

◆ TEST() [1/101]

mongo::TEST ( Deadlock  ,
NoDeadlock   
)

◆ TEST() [2/101]

mongo::TEST ( ResourceId  ,
Semantics   
)

◆ TEST() [3/101]

mongo::TEST ( LockStats  ,
NoWait   
)

◆ TEST() [4/101]

mongo::TEST ( NamespaceTest  ,
Basics   
)

◆ TEST() [5/101]

mongo::TEST ( LockerImpl  ,
LockNoConflict   
)

◆ TEST() [6/101]

mongo::TEST ( CollectionOptions  ,
SimpleRoundTrip   
)

◆ TEST() [7/101]

mongo::TEST ( Deadlock  ,
Simple   
)

◆ TEST() [8/101]

mongo::TEST ( FastMapNoAlloc  ,
Empty   
)

◆ TEST() [9/101]

mongo::TEST ( NamespaceTest  ,
ExtraName   
)

◆ TEST() [10/101]

mongo::TEST ( LockStats  ,
Wait   
)

◆ TEST() [11/101]

mongo::TEST ( ResourceId  ,
Constructors   
)

◆ TEST() [12/101]

mongo::TEST ( FastMapNoAlloc  ,
NotEmpty   
)

◆ TEST() [13/101]

mongo::TEST ( CollectionOptions  ,
Validate   
)

◆ TEST() [14/101]

mongo::TEST ( ResourceId  ,
Masking   
)

◆ TEST() [15/101]

mongo::TEST ( LockerImpl  ,
ReLockNoConflict   
)

◆ TEST() [16/101]

mongo::TEST ( CollectionOptions  ,
Validator   
)

◆ TEST() [17/101]

mongo::TEST ( Deadlock  ,
SimpleUpgrade   
)

◆ TEST() [18/101]

mongo::TEST ( LockerImpl  ,
ConflictWithTimeout   
)

◆ TEST() [19/101]

mongo::TEST ( LockManager  ,
Grant   
)

◆ TEST() [20/101]

mongo::TEST ( CollectionOptions  ,
ErrorBadSize   
)

◆ TEST() [21/101]

mongo::TEST ( LockStats  ,
Reporting   
)

◆ TEST() [22/101]

mongo::TEST ( FastMapNoAlloc  ,
FindNonExisting   
)

◆ TEST() [23/101]

mongo::TEST ( FastMapNoAlloc  ,
FindAndRemove   
)

◆ TEST() [24/101]

mongo::TEST ( CollectionOptions  ,
ErrorBadMax   
)

◆ TEST() [25/101]

mongo::TEST ( CollectionOptions  ,
CappedSizeRoundsUpForAlignment   
)

◆ TEST() [26/101]

mongo::TEST ( LockerImpl  ,
ConflictUpgradeWithTimeout   
)

◆ TEST() [27/101]

mongo::TEST ( Deadlock  ,
Indirect   
)

◆ TEST() [28/101]

mongo::TEST ( LockManager  ,
GrantMultipleNoConflict   
)

◆ TEST() [29/101]

mongo::TEST ( CollectionOptions  ,
IgnoreSizeWrongType   
)

◆ TEST() [30/101]

mongo::TEST ( CollectionOptions  ,
IgnoreMaxWrongType   
)

◆ TEST() [31/101]

mongo::TEST ( LockerImpl  ,
ReadTransaction   
)

◆ TEST() [32/101]

mongo::TEST ( CollectionOptions  ,
InvalidStorageEngineField   
)

◆ TEST() [33/101]

mongo::TEST ( LockManager  ,
GrantMultipleFIFOOrder   
)

◆ TEST() [34/101]

mongo::TEST ( FastMapNoAlloc  ,
RemoveAll   
)

◆ TEST() [35/101]

mongo::TEST ( CollectionOptions  ,
ParseEngineField   
)

◆ TEST() [36/101]

mongo::TEST ( Deadlock  ,
IndirectWithUpgrade   
)

◆ TEST() [37/101]

mongo::TEST ( LockerImpl  ,
saveAndRestoreGlobal   
)

Test that saveMMAPV1LockerImpl works by examining the output.

◆ TEST() [38/101]

mongo::TEST ( CollectionOptions  ,
ResetStorageEngineField   
)

◆ TEST() [39/101]

mongo::TEST ( LockerImpl  ,
saveAndRestoreGlobalAcquiredTwice   
)

Test that we don't unlock when we have the global lock more than once.

◆ TEST() [40/101]

mongo::TEST ( LockManager  ,
GrantRecursive   
)

◆ TEST() [41/101]

mongo::TEST ( CollectionOptions  ,
ModifyStorageEngineField   
)

◆ TEST() [42/101]

mongo::TEST ( CollectionOptions  ,
FailToParseCollationThatIsNotAnObject   
)

◆ TEST() [43/101]

mongo::TEST ( LockerImpl  ,
saveAndRestoreDBAndCollection   
)

Tests that restoreMMAPV1LockerImpl works by locking a db and collection and saving + restoring.

◆ TEST() [44/101]

mongo::TEST ( CollectionOptions  ,
FailToParseCollationThatIsAnEmptyObject   
)

◆ TEST() [45/101]

mongo::TEST ( LockManager  ,
GrantRecursiveCompatibleConvertUp   
)

◆ TEST() [46/101]

mongo::TEST ( CollectionOptions  ,
CollationFieldParsesCorrectly   
)

◆ TEST() [47/101]

mongo::TEST ( CollectionOptions  ,
ParsedCollationObjShouldBeOwned   
)

◆ TEST() [48/101]

mongo::TEST ( CollectionOptions  ,
ResetClearsCollationField   
)

◆ TEST() [49/101]

mongo::TEST ( LockerImpl  ,
DefaultLocker   
)

◆ TEST() [50/101]

mongo::TEST ( CollectionOptions  ,
CollationFieldLeftEmptyWhenOmitted   
)

◆ TEST() [51/101]

mongo::TEST ( LockManager  ,
GrantRecursiveNonCompatibleConvertUp   
)

◆ TEST() [52/101]

mongo::TEST ( CollectionOptions  ,
CollationFieldNotDumpedToBSONWhenOmitted   
)

◆ TEST() [53/101]

mongo::TEST ( CollectionOptions  ,
ViewParsesCorrectly   
)

◆ TEST() [54/101]

mongo::TEST ( LockerImpl  ,
MMAPV1Locker   
)

◆ TEST() [55/101]

mongo::TEST ( CollectionOptions  ,
ViewParsesCorrectlyWithoutPipeline   
)

◆ TEST() [56/101]

mongo::TEST ( CollectionOptions  ,
PipelineFieldRequiresViewOn   
)

◆ TEST() [57/101]

mongo::TEST ( LockManager  ,
GrantRecursiveNonCompatibleConvertDown   
)

◆ TEST() [58/101]

mongo::TEST ( CollectionOptions  ,
UnknownTopLevelOptionFailsToParse   
)

◆ TEST() [59/101]

mongo::TEST ( LockerImpl  ,
CanceledDeadlockUnblocks   
)

◆ TEST() [60/101]

mongo::TEST ( WiredTigerUtilTest  ,
GetStatisticsValueMissingTable   
)

◆ TEST() [61/101]

mongo::TEST ( CollectionOptions  ,
CreateOptionIgnoredIfFirst   
)

◆ TEST() [62/101]

mongo::TEST ( CollectionOptions  ,
CreateOptionIgnoredIfNotFirst   
)

◆ TEST() [63/101]

mongo::TEST ( WiredTigerUtilTest  ,
GetStatisticsValueStatisticsDisabled   
)

◆ TEST() [64/101]

mongo::TEST ( CollectionOptions  ,
UnknownOptionIgnoredIfCreateOptionFirst   
)

◆ TEST() [65/101]

mongo::TEST ( LockManager  ,
Conflict   
)

◆ TEST() [66/101]

mongo::TEST ( CollectionOptions  ,
UnknownOptionIgnoredIfCreateOptionPresent   
)

◆ TEST() [67/101]

mongo::TEST ( CollectionOptions  ,
UnknownOptionRejectedIfCreateOptionNotPresent   
)

◆ TEST() [68/101]

mongo::TEST ( WiredTigerUtilTest  ,
GetStatisticsValueInvalidKey   
)

◆ TEST() [69/101]

mongo::TEST ( CollectionOptions  ,
DuplicateCreateOptionIgnoredIfCreateOptionFirst   
)

◆ TEST() [70/101]

mongo::TEST ( CollectionOptions  ,
DuplicateCreateOptionIgnoredIfCreateOptionNotFirst   
)

◆ TEST() [71/101]

mongo::TEST ( WiredTigerUtilTest  ,
GetStatisticsValueValidKey   
)

◆ TEST() [72/101]

mongo::TEST ( CollectionOptions  ,
MaxTimeMSWhitelistedOptionIgnored   
)

◆ TEST() [73/101]

mongo::TEST ( LockerImpl  ,
SharedLocksShouldTwoPhaseLockIsTrue   
)

◆ TEST() [74/101]

mongo::TEST ( CollectionOptions  ,
WriteConcernWhitelistedOptionIgnored   
)

◆ TEST() [75/101]

mongo::TEST ( CollectionOptions  ,
ParseUUID   
)

◆ TEST() [76/101]

mongo::TEST ( LockManager  ,
MultipleConflict   
)

◆ TEST() [77/101]

mongo::TEST ( WiredTigerUtilTest  ,
GetStatisticsValueAsUInt8   
)

◆ TEST() [78/101]

mongo::TEST ( LockManager  ,
ConflictCancelWaiting   
)

◆ TEST() [79/101]

mongo::TEST ( LockerImpl  ,
ModeIXAndXLockParticipatesInTwoPhaseLocking   
)

◆ TEST() [80/101]

mongo::TEST ( LockManager  ,
ConflictCancelMultipleWaiting   
)

◆ TEST() [81/101]

mongo::TEST ( LockerImpl  ,
OverrideLockRequestTimeout   
)

◆ TEST() [82/101]

mongo::TEST ( LockManager  ,
CancelWaitingConversionWeakModes   
)

◆ TEST() [83/101]

mongo::TEST ( LockerImpl  ,
DoNotWaitForLockAcquisition   
)

◆ TEST() [84/101]

mongo::TEST ( LockManager  ,
CancelWaitingConversionStrongModes   
)

◆ TEST() [85/101]

mongo::TEST ( LockManager  ,
ConflictingConversion   
)

◆ TEST() [86/101]

mongo::TEST ( LockerImpl  ,
GetLockerInfoShouldReportHeldLocks   
)

◆ TEST() [87/101]

mongo::TEST ( LockerImpl  ,
GetLockerInfoShouldReportPendingLocks   
)

◆ TEST() [88/101]

mongo::TEST ( LockManager  ,
ConflictingConversionInTheMiddle   
)

◆ TEST() [89/101]

mongo::TEST ( LockManager  ,
ConvertUpgrade   
)

◆ TEST() [90/101]

mongo::TEST ( LockerImpl  ,
ReaquireLockPendingUnlock   
)

◆ TEST() [91/101]

mongo::TEST ( LockManager  ,
Downgrade   
)

◆ TEST() [92/101]

mongo::TEST ( LockerImpl  ,
AcquireLockPendingUnlockWithCoveredMode   
)

◆ TEST() [93/101]

mongo::TEST ( LockerImpl  ,
ConvertLockPendingUnlock   
)

◆ TEST() [94/101]

mongo::TEST ( LockManager  ,
ValidateConflictMatrix   
)

◆ TEST() [95/101]

mongo::TEST ( LockerImpl  ,
ConvertLockPendingUnlockAndUnlock   
)

◆ TEST() [96/101]

mongo::TEST ( LockManager  ,
EnqueueAtFront   
)

◆ TEST() [97/101]

mongo::TEST ( LockManager  ,
CompatibleFirstImmediateGrant   
)

◆ TEST() [98/101]

mongo::TEST ( LockManager  ,
CompatibleFirstGrantAlreadyQueued   
)

◆ TEST() [99/101]

mongo::TEST ( LockManager  ,
CompatibleFirstDelayedGrant   
)

◆ TEST() [100/101]

mongo::TEST ( LockManager  ,
CompatibleFirstCancelWaiting   
)

◆ TEST() [101/101]

mongo::TEST ( LockManager  ,
Fairness   
)

◆ TEST_F() [1/21]

mongo::TEST_F ( WiredTigerUtilMetadataTest  ,
GetConfigurationStringInvalidURI   
)

◆ TEST_F() [2/21]

mongo::TEST_F ( WiredTigerUtilMetadataTest  ,
GetConfigurationStringNull   
)

◆ TEST_F() [3/21]

mongo::TEST_F ( KVStorageEngineTest  ,
ReconcileIdentsTest   
)

◆ TEST_F() [4/21]

mongo::TEST_F ( WiredTigerUtilMetadataTest  ,
GetConfigurationStringSimple   
)

◆ TEST_F() [5/21]

mongo::TEST_F ( WiredTigerUtilMetadataTest  ,
GetApplicationMetadataInvalidURI   
)

◆ TEST_F() [6/21]

mongo::TEST_F ( WiredTigerUtilMetadataTest  ,
GetApplicationMetadataNull   
)

◆ TEST_F() [7/21]

mongo::TEST_F ( WiredTigerUtilMetadataTest  ,
GetApplicationMetadataString   
)

◆ TEST_F() [8/21]

mongo::TEST_F ( KVStorageEngineTest  ,
RecreateIndexes   
)

◆ TEST_F() [9/21]

mongo::TEST_F ( WiredTigerUtilMetadataTest  ,
GetApplicationMetadataDuplicateKeys   
)

◆ TEST_F() [10/21]

mongo::TEST_F ( WiredTigerUtilMetadataTest  ,
GetApplicationMetadataTypes   
)

◆ TEST_F() [11/21]

mongo::TEST_F ( SnapshotManagerTests  ,
ConsistentIfNotSupported   
)

◆ TEST_F() [12/21]

mongo::TEST_F ( WiredTigerUtilMetadataTest  ,
CheckApplicationMetadataFormatVersionMissingKey   
)

◆ TEST_F() [13/21]

mongo::TEST_F ( SnapshotManagerTests  ,
FailsWithNoCommittedSnapshot   
)

◆ TEST_F() [14/21]

mongo::TEST_F ( WiredTigerUtilMetadataTest  ,
CheckApplicationMetadataFormatVersionString   
)

◆ TEST_F() [15/21]

mongo::TEST_F ( WiredTigerUtilMetadataTest  ,
CheckApplicationMetadataFormatVersionNumber   
)

◆ TEST_F() [16/21]

mongo::TEST_F ( WiredTigerUtilMetadataTest  ,
CheckApplicationMetadataFormatInvalidURI   
)

◆ TEST_F() [17/21]

mongo::TEST_F ( SnapshotManagerTests  ,
FailsAfterDropAllSnapshotsWhileYielded   
)

◆ TEST_F() [18/21]

mongo::TEST_F ( SnapshotManagerTests  ,
BasicFunctionality   
)

◆ TEST_F() [19/21]

mongo::TEST_F ( SnapshotManagerTests  ,
UpdateAndDelete   
)

◆ TEST_F() [20/21]

mongo::TEST_F ( SnapshotManagerTests  ,
InsertAndReadOnLocalSnapshot   
)

◆ TEST_F() [21/21]

mongo::TEST_F ( SnapshotManagerTests  ,
UpdateAndDeleteOnLocalSnapshot   
)

◆ touch_pages()

void mongo::touch_pages ( const char *  buf,
size_t  length,
size_t  pageSize 
)

Touches a range of pages, to encourage the OS to get them into the buffer pool.

◆ uassertNamespaceNotIndex()

void mongo::uassertNamespaceNotIndex ( StringData  ns,
StringData  caller 
)

◆ uncompress()

bool mongo::uncompress ( const char *  compressed,
size_t  compressed_length,
std::string *  uncompressed 
)

◆ uniqueReservedPath()

Path mongo::uniqueReservedPath ( const char *  prefix)

◆ updateNonReplicatedUniqueIndexes()

Status mongo::updateNonReplicatedUniqueIndexes ( OperationContext *  opCtx)

◆ updateUniqueIndexesOnUpgrade()

void mongo::updateUniqueIndexesOnUpgrade ( OperationContext *  opCtx)

◆ useSparseFiles()

static bool mongo::useSparseFiles ( int  fd)
static

◆ validateLogAndAppendError()

void mongo::validateLogAndAppendError ( ValidateResults results,
const std::string &  errMsg 
)

Helper to add and log errors for validate.

Validate helper function to log an error and append the error to the results.

◆ validateStorageOptions()

Status mongo::validateStorageOptions ( ServiceContext *  service,
const BSONObj &  storageEngineOptions,
stdx::function< Status(const StorageEngine::Factory *const, const BSONObj &)>  validateFunc 
)

◆ WiredTigerCursorCacheSizeSetting()

ExportedServerParameter<std::int32_t, ServerParameterType::kStartupAndRuntime> mongo::WiredTigerCursorCacheSizeSetting ( ServerParameterSet::getGlobal()  ,
"wiredTigerCursorCacheSize"  ,
kWiredTigerCursorCacheSize 
)

◆ WiredTigerOptions()

MONGO_MODULE_STARTUP_OPTIONS_REGISTER() mongo::WiredTigerOptions ( InitializerContext *  context)

◆ wiredTigerPrepareConflictLog()

void mongo::wiredTigerPrepareConflictLog ( int  attempts)

Logs a message with the number of prepare conflict retry attempts.

◆ wiredTigerPrepareConflictRetry()

template<typename F >
int mongo::wiredTigerPrepareConflictRetry ( OperationContext *  opCtx,
F &&  f 
)

Runs the argument function f as many times as needed for f to return an error other than WT_PREPARE_CONFLICT.

Each time f returns WT_PREPARE_CONFLICT we wait until the current unit of work commits or aborts, and then try f again. Imposes no upper limit on the number of times to re-try f, so any required timeout behavior must be enforced within f. The function f must return a WiredTiger error code.

◆ writeConflictRetry()

template<typename F >
auto mongo::writeConflictRetry ( OperationContext *  opCtx,
StringData  opStr,
StringData  ns,
F &&  f 
)

Runs the argument function f as many times as needed for f to complete or throw an exception other than WriteConflictException.

For each time f throws a WriteConflictException, logs the error, waits a spell, cleans up, and then tries f again. Imposes no upper limit on the number of times to re-try f, so any required timeout behavior must be enforced within f.

If we are already in a WriteUnitOfWork, we assume that we are being called within a WriteConflictException retry loop up the call stack. Hence, this retry loop is reduced to an invocation of the argument function f without any exception handling and retry logic.

◆ wt_keeptxnopen()

bool mongo::wt_keeptxnopen ( )
inline

◆ wtRCToStatus()

Status mongo::wtRCToStatus ( int  retCode,
const char *  prefix = NULL 
)
inline

converts wiredtiger return codes to mongodb statuses.

◆ wtRCToStatus_slow()

Status mongo::wtRCToStatus_slow ( int  retCode,
const char *  prefix 
)

Variable Documentation

◆ __record_touch_dummy

volatile int mongo::__record_touch_dummy = 1

◆ _nextMemoryMappedFileLocation

unsigned long long mongo::_nextMemoryMappedFileLocation = memoryMappedFileLocationFloor
static

◆ _nextMemoryMappedFileLocationMutex

SimpleMutex mongo::_nextMemoryMappedFileLocationMutex
static

◆ _supportsDocLocking

bool mongo::_supportsDocLocking

A RAII object that temporarily forces setting of the _supportsDocLocking global variable (defined in db/service_context.cpp and returned by mongo::supportsDocLocking()) for testing purposes.

◆ _this

Collection* const mongo::_this

◆ _touch_pages_char_reader

char mongo::_touch_pages_char_reader

◆ _uniqueNumberMutex

SimpleMutex mongo::_uniqueNumberMutex
static

◆ BinDataCodeToLength

const int mongo::BinDataCodeToLength[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 32}

◆ BinDataLengthToCode

const int mongo::BinDataLengthToCode[]
Initial value:
= {
0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60,
0x70, 0x80, -1 , 0x90 , -1 , 0xa0 , -1 ,
0xb0 , -1 , 0xc0 , -1, -1, -1, 0xd0 ,
-1, -1, -1, 0xe0 , -1, -1, -1,
-1, -1, -1, -1, 0xf0
}

◆ BinDataLenMask

const unsigned mongo::BinDataLenMask = 0xf0

◆ BinDataLenMax

const int mongo::BinDataLenMax = 32

◆ BinDataTypeMask

const unsigned mongo::BinDataTypeMask
Initial value:
=
0x0f

◆ cat

OperationContext* const const IndexCatalog* const mongo::cat

◆ collator

std::unique_ptr<CollatorInterface> mongo::collator

◆ collection

OperationContext *const Collection *const mongo::collection = db->getCollection(opCtx, ns)

◆ collectionOptions

if (collection) return Status(ErrorCodes if (db->getViewCatalog()->lookup(opCtx, ns)) return Status(ErrorCodes CollectionOptions mongo::collectionOptions

◆ compoundKey1a

const BSONObj mongo::compoundKey1a
Initial value:
= BSON("" << 1 << ""
<< "a")

◆ compoundKey1b

const BSONObj mongo::compoundKey1b
Initial value:
= BSON("" << 1 << ""
<< "b")

◆ compoundKey1c

const BSONObj mongo::compoundKey1c
Initial value:
= BSON("" << 1 << ""
<< "c")

◆ compoundKey1d

const BSONObj mongo::compoundKey1d
Initial value:
= BSON("" << 1 << ""
<< "d")

◆ compoundKey2a

const BSONObj mongo::compoundKey2a
Initial value:
= BSON("" << 2 << ""
<< "a")

◆ compoundKey2b

const BSONObj mongo::compoundKey2b
Initial value:
= BSON("" << 2 << ""
<< "b")

◆ compoundKey2c

const BSONObj mongo::compoundKey2c
Initial value:
= BSON("" << 2 << ""
<< "c")

◆ compoundKey3a

const BSONObj mongo::compoundKey3a
Initial value:
= BSON("" << 3 << ""
<< "a")

◆ compoundKey3b

const BSONObj mongo::compoundKey3b
Initial value:
= BSON("" << 3 << ""
<< "b")

◆ compoundKey3c

const BSONObj mongo::compoundKey3c
Initial value:
= BSON("" << 3 << ""
<< "c")

◆ context

InitializerContext * mongo::context
Initial value:
{
registerStorageEngine(getGlobalServiceContext(),
std::make_unique<DevNullStorageEngineFactory>())
void registerStorageEngine(ServiceContext *service, std::unique_ptr< StorageEngine::Factory > factory)
Registers a storage engine onto the given "service".
Definition: storage_engine_init.cpp:233

◆ createDefaultIndexes

OperationContext Database StringData BSONObj CollectionOptions::ParseKind bool mongo::createDefaultIndexes

◆ createTimestampSafeUniqueIndex

bool mongo::createTimestampSafeUniqueIndex = false

◆ cunittest

mongo::CmpUnitTest mongo::cunittest

◆ dataFileSync

DataFileSync mongo::dataFileSync

◆ db

OperationContext Database* mongo::db

◆ dbce

Collection* const OperationContext* const const StringData OptionalCollectionUUID CollectionCatalogEntry* const RecordStore* const DatabaseCatalogEntry* const mongo::dbce

◆ dbEntry

Database* const OperationContext* const const StringData DatabaseCatalogEntry* const mongo::dbEntry

◆ debugCollectionUUIDs

bool mongo::debugCollectionUUIDs

◆ desc

OperationContext const IndexDescriptor* mongo::desc

◆ descriptor

IndexCatalogEntry* const OperationContext* const const StringData CollectionCatalogEntry* const std::unique_ptr<IndexDescriptor> mongo::descriptor

◆ details

Collection* const OperationContext* const const StringData OptionalCollectionUUID CollectionCatalogEntry* const mongo::details

◆ documentValidationDisabled

const OperationContext::Decoration< bool > mongo::documentValidationDisabled
Initial value:
=
OperationContext::declareDecoration<bool>()

If true, Collection should do no validation of writes from this OperationContext.

Note that Decorations are value-constructed so this defaults to false.

◆ else

mongo::else
Initial value:
{
invariant(
ServiceContext::UniqueOperationContext opCtx
Definition: recovery_unit_test_harness.cpp:49
Collection *const const NamespaceString & ns
Definition: collection_info_cache_impl.cpp:53
Collection * createCollection(OperationContext *const opCtx, StringData ns, const CollectionOptions &options=CollectionOptions(), const bool createDefaultIndexes=true, const BSONObj &idIndex=BSONObj())
Definition: database.h:307
if(collection) return Status(ErrorCodes if(db->getViewCatalog() ->lookup(opCtx, ns)) return Status(ErrorCodes CollectionOptions collectionOptions
Definition: database_impl.cpp:970
OperationContext Database * db
Definition: database_impl.cpp:949
OperationContext Database StringData BSONObj CollectionOptions::ParseKind bool createDefaultIndexes
Definition: database_impl.cpp:949

◆ exportedMaxIndexBuildMemoryUsageParameter

mongo::ExportedMaxIndexBuildMemoryUsageParameter mongo::exportedMaxIndexBuildMemoryUsageParameter

◆ freelistAllocs

Counter64 mongo::freelistAllocs
static

◆ freelistBucketExhausted

Counter64 mongo::freelistBucketExhausted
static

◆ freelistIterations

Counter64 mongo::freelistIterations
static

◆ fullNS

Collection* const OperationContext* const const StringData mongo::fullNS

◆ inc

int mongo::inc = 0

◆ includeUnfinishedIndexes

OperationContext* const const IndexCatalog* const const bool mongo::includeUnfinishedIndexes

◆ INDEX_CATALOG_INIT

const int mongo::INDEX_CATALOG_INIT = 283711
static

◆ INDEX_CATALOG_UNINIT

const int mongo::INDEX_CATALOG_UNINIT = 654321
static

◆ infoCache

IndexCatalogEntry* const OperationContext* const const StringData CollectionCatalogEntry* const std::unique_ptr<IndexDescriptor> CollectionInfoCache* const mongo::infoCache

◆ iu_unittest

mongo::IndexUpdateTest mongo::iu_unittest

◆ kCappedDocumentRemoveLimit

int mongo::kCappedDocumentRemoveLimit = 3
static

◆ kDataFormatV1KeyStringV0IndexVersionV1

const int mongo::kDataFormatV1KeyStringV0IndexVersionV1 = 6

◆ kDataFormatV2KeyStringV1IndexVersionV2

const int mongo::kDataFormatV2KeyStringV1IndexVersionV2 = 8

◆ kDataFormatV3KeyStringV0UniqueIndexVersionV1

const int mongo::kDataFormatV3KeyStringV0UniqueIndexVersionV1 = 9

◆ kDataFormatV4KeyStringV1UniqueIndexVersionV2

const int mongo::kDataFormatV4KeyStringV1UniqueIndexVersionV2 = 10

◆ key0

const BSONObj mongo::key0 = BSON("" << 0)

◆ key1

const BSONObj mongo::key1 = BSON("" << 1)

◆ key2

const BSONObj mongo::key2 = BSON("" << 2)

◆ key3

const BSONObj mongo::key3 = BSON("" << 3)

◆ key4

const BSONObj mongo::key4 = BSON("" << 4)

◆ key5

const BSONObj mongo::key5 = BSON("" << 5)

◆ key6

const BSONObj mongo::key6 = BSON("" << 6)

◆ kMaximumIndexVersion

const int mongo::kMaximumIndexVersion = kDataFormatV4KeyStringV1UniqueIndexVersionV2

◆ kMinimumIndexVersion

const int mongo::kMinimumIndexVersion = kDataFormatV1KeyStringV0IndexVersionV1

◆ kNeedsFetchFailFreq

const int mongo::kNeedsFetchFailFreq = 2
static

◆ kWiredTigerEngineName

const std::string mongo::kWiredTigerEngineName = "wiredTiger"

◆ mapViewMutex

stdx::mutex mongo::mapViewMutex

◆ maxNumIndexesAllowed

IndexCatalog* const Collection* const const int mongo::maxNumIndexesAllowed

◆ memJournalServerStatusMetric

mongo::MemJournalServerStatusMetric mongo::memJournalServerStatusMetric

◆ memoryMappedFileLocationFloor

const unsigned long long mongo::memoryMappedFileLocationFloor = 256LL * 1024LL * 1024LL * 1024LL

◆ mmapv1GlobalOptions

mongo::MMAPV1Options mongo::mmapv1GlobalOptions

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.

◆ moveCounter

Counter64 mongo::moveCounter

◆ name

Database* const OperationContext* const const StringData mongo::name

◆ nDumped

int mongo::nDumped = 0

◆ needsFetchFailCounter

Counter64 mongo::needsFetchFailCounter
static

◆ ns

IndexCatalogEntry *const OperationContext *const const StringData mongo::ns

◆ nullOrdering

const Ordering mongo::nullOrdering = Ordering::make(BSONObj())

◆ OldBucketSize

const int mongo::OldBucketSize = 8192

◆ opCtx

OperationContext *const mongo::opCtx

◆ options

OperationContext Database StringData BSONObj mongo::options

◆ parseKind

OperationContext Database StringData BSONObj CollectionOptions::ParseKind mongo::parseKind

◆ privateViews

PointerToDurableMappedFile mongo::privateViews

◆ recordStore

Collection* const OperationContext* const const StringData OptionalCollectionUUID CollectionCatalogEntry* const RecordStore* const mongo::recordStore

◆ resourceIdAdminDB

const ResourceId mongo::resourceIdAdminDB = ResourceId(RESOURCE_DATABASE, StringData("admin"))

◆ resourceIdLocalDB

const ResourceId mongo::resourceIdLocalDB = ResourceId(RESOURCE_DATABASE, StringData("local"))

◆ resourceIdOplog

const ResourceId mongo::resourceIdOplog = ResourceId(RESOURCE_COLLECTION, StringData("local.oplog.rs"))

◆ resourceIdParallelBatchWriterMode

const ResourceId mongo::resourceIdParallelBatchWriterMode
Initial value:
=
ResourceId(RESOURCE_GLOBAL, ResourceId::SINGLETON_PARALLEL_BATCH_WRITER_MODE)
Definition: lock_manager_defs.h:153

◆ sizes

unsigned mongo::sizes[]
static
Initial value:
= {0,
1,
1,
0,
9,
0,
0,
0,
13,
0,
1,
1,
9,
0,
1,
0}

◆ Status

OperationContext Database StringData BSONObj CollectionOptions::ParseKind bool const BSONObj& idIndex mongo::Status
Initial value:
{
invariant(db)
OperationContext Database * db
Definition: database_impl.cpp:949

◆ status

mongo::status = collectionOptions.parse(options, parseKind)

◆ storageGlobalParams

StorageGlobalParams mongo::storageGlobalParams

◆ this_

IndexCatalog *const mongo::this_

◆ uuid

Collection* const OperationContext* const const StringData OptionalCollectionUUID mongo::uuid

◆ void

OperationContext const IndexDescriptor InsertDeleteOptions* options mongo::void
Initial value:
{
return IndexCatalogImpl::prepareInsertDeleteOptions(opCtx, desc, options)
ServiceContext::UniqueOperationContext opCtx
Definition: recovery_unit_test_harness.cpp:49
OperationContext Database StringData BSONObj options
Definition: database_impl.cpp:949
OperationContext const IndexDescriptor * desc
Definition: index_catalog_impl.cpp:97

◆ wiredTigerGlobalOptions

WiredTigerGlobalOptions mongo::wiredTigerGlobalOptions