summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/capped_utils.cpp
Commit message (Collapse)AuthorAgeFilesLines
* SERVER-53307 Make ViewCatalog globalDan Larkin-York2022-01-221-2/+2
|
* SERVER-61337 ConvertToCapped should check versioningAllison Easton2021-12-021-0/+2
|
* SERVER-57119 Changed view_catalog interface to only use NamespaceStringlukebhan2021-06-231-2/+2
| | | | | | | | | | | | | | removed places where ns.ns() is called changed stringdata to namespace string for lookup function update view catalog update view catalog test fixed test fixed create coll
* SERVER-56002 SERVER-56023 Store Collection metadata in the Collection and ↵Henrik Edin2021-05-201-3/+1
| | | | | | | | | | | reply on the copy-on-write machinery to keep it in sync with the durable catalog. All updates to the metadata needs to happen through the Collection, moved interfaces from the DurableCatalog to the Collection. Removed back pointer to Collection in IndexCatalogEntryImpl, interfaces now correctly take a const or non-const Collection. This should make its iterface const-correct to avoid making bugs where the copy-on-write system for Collections are bypassed. Multikey handle is special as it needs to happen without exclusive access to the Collection. Implemented isolation for the Collection metadata when multikey is changed. It handles multi-doc transactions and is only commited to the Collection instance after the write to the durable catalog successfully commits. listCollections and listIndexes can now safetly read the metadata cache without needing to read from the durable catalog making them safe to do without Collection level locks.
* SERVER-56453 fix LocalOplogInfo namespace to match new header locationBenety Goh2021-05-141-1/+1
|
* SERVER-56453 move LocalOplogInfo header from repl/ to catalog/Benety Goh2021-05-141-1/+1
|
* SERVER-16049 Replicate capped collection deletesGregory Wlodarek2021-04-231-0/+19
|
* SERVER-55559 StorageInterfaceImpl should use bounded collection scans on ↵Louis Williams2021-04-061-1/+0
| | | | clustered collections
* SERVER-53737 Check for sharded collections in renameCollectionLegacyPierlauro Sciarelli2021-01-131-1/+0
|
* SERVER-52556 Versioned CollectionCatalog. Writes are performed using ↵Henrik Edin2020-11-131-4/+4
| | | | | | | copy-on-write. Internal mutexes when reading CollectionCatalog are removed, just one mutex for writes are needed. Lock-free reads helper AutoGetCollectionForReadLockFree stashes a CollectionCatalog consistent with snapshot on OperationContext
* SERVER-51200 CollectionPtr in RequiresCollectionStage point to instance ↵Henrik Edin2020-10-131-3/+3
| | | | | | | | | | | owned by AutoGetCollection RequiresCollectionStage now holds a pointer to CollectionPtr owned by an AutoGetCollection. When we save and restore the executor a new CollectionPtr pointer needs to be assigned. Plan executors can no longer be created with temporary CollectionPtr instances and their interface have been changed to take pointers to avoid binding to rvalues. RequiresCollectionStage no longer loads collections from the catalog and will be in sync with the owning AutoGetCollection.
* SERVER-51228 emptycapped should set the collection minimumVisibleSnapshot to ↵Louis Williams2020-10-031-1/+9
| | | | cause dbHash to return a SnapshotUnavailable error
* SERVER-50984 Add CollectionPtr to replace usage of const Collection*Henrik Edin2020-09-261-3/+3
| | | | | | | | | | | | It implements a yieldable interface that is used to re-load the Collection pointer from the catalog after a yield that released locks. With lock-free reads and copy-on-write on Collection instances releasing locks without notifying an AutoGetCollection at a higher level may cause its pointers to dangle if a MODE_X writer installs a new Collection instance in the catalog. CollectionPtr should be passed by const reference so a yield can notify all the way up.
* SERVER-50349 Getting a writable collection now requires the caller to be ↵Henrik Edin2020-09-151-4/+2
| | | | | | | | | | | | | inside a WUOW by default There are three modes when accessing a writable Collection: * Managed in WUOW (default) * Unmanaged (users need to commit/rollback) * Inplace that provides direct access to the Collection in the catalog. (Users need to ensure there's no concurrent operations going on) Added a helper RAII type CollectionWriter that abstract the three modes above and also provides abstraction on different methods of accessing Collections (AutoGetCollection or manual lookups). Writable Collection is aquired lazily when needed (usually inside a WUOW).
* SERVER-50408 Change NotMaster error name to NotWritablePrimaryPavi Vetriselvan2020-09-031-2/+2
|
* SERVER-50317 Const correct uses of CollectionHenrik Edin2020-09-021-6/+7
| | | | | | Most of the code should only need a const Collection now. AutoGetCollection returns a const Collection by default. There is a placeholder getWritableCollection() interface that will handle the necessary steps we need for lock free reads in the future. Added some operators to AutoGetCollection so it behaves more like a smart pointer.
* SERVER-48477 Make PlanExecutor interface more genericDavid Storch2020-07-091-10/+18
| | | | | | After this change, the interface is sensible for both the classic and SBE engines (with the exception of 'getRootStage()' which is left as future work).
* SERVER-48228 Move slot-based execution engine and supporting changes into ↵Martin Neupauer2020-06-111-5/+6
| | | | | | | | | | | | | | the master branch This is an initial commit for the slot-based execution engine (SBE) which contains: * Implementation of the core slot-based engine. * The SBE stage builder, which is responsible for translating a QuerySolution tree into an SBE plan. * Other changes necessary for integration with the find command. Co-authored-by: Anton Korshunov <anton.korshunov@mongodb.com> Co-authored-by: Justin Seyster <justin.seyster@mongodb.com> Co-authored-by: David Storch <david.storch@mongodb.com>
* SERVER-43821 Make PlanStage and PlanExecutor return errors by throwingDavid Storch2020-05-291-4/+1
| | | | | | | | This eliminates the need for the FAILURE status codes in PlanStage and PlanExecutor, and brings query execution's error reporting more in line with that of the rest of the server. It also makes it easier for future implementations of PlanExecutor to comply with the interface.
* SERVER-39140 Remove BackgroundOperationLouis Williams2020-05-261-3/+0
|
* SERVER-47735 change mongo source over to logv2Billy Donahue2020-04-261-1/+1
| | | | | | - Remove several legacy logger/ files - Convert all MONGO_LOG_DEFAULT_COMPONENT to the LOGV2 version. - Globally replace logger::{LogSeverity,LogComponent} => logv2::
* SERVER-47526 Use getCollectionDescription on rename collectionMarcos José Grillo Ramírez2020-04-241-0/+1
| | | | | | - Add flag to renameCollection command to know when the source collection is temporary - Prevent checks of isSharded on secondaries - Prevent checks of isSharded on temporary collections
* SERVER-47423 Take collection MODE_X locks instead of databse MODE_X lock in ↵Gregory Noma2020-04-101-9/+6
| | | | cloneCollectionAsCapped
* SERVER-47317 Take collection MODE_X locks instead of database MODE_X lock in ↵Gregory Noma2020-04-091-21/+34
| | | | covertToCapped
* SERVER-43859: Take MODE_IX locks for collection creation.Daniel Gottlieb2019-11-261-4/+6
| | | | | | | | | | | | | | | | | Two concurrent storage transactions can now create collections with the same collection name. These transactions will conflict at commit time; the first committer will win and register their collection into the global catalog. The losing transactions will bubble a WriteConflictException. Top-level callers that should fail if the collection already existed must now check and fail with a NamespaceExists error code. Previously, those callers could rely on lower level code returning the NamespaceExists error. Callers that were implicitly creating a collection may retry the operation, using the now-registered collection. These transaction-local collections (UncommittedCollections) are returned when doing any CollectionCatalog::lookup* call.
* SERVER-44276: Change storage engine catalog map to be keyed by RecordId ↵Daniel Gottlieb2019-11-061-1/+2
| | | | instead of Namespace.
* SERVER-41496 Remove Database::getCollection() and replace with ↵Evgeni Dobranov2019-09-301-4/+5
| | | | CollectionCatalog::get().lookupCollectionByNamespace()
* SERVER-41772 Apply clang-format 7.0.1 to the codebaseclang-format-7.0.12019-07-271-8/+6
|
* SERVER-42194 Make Collection always hold a UUID (rather than optional UUID)Xiangyu Yao2019-07-151-2/+1
|
* SERVER-40717 Remove CollectionCatalogEntry and KVColletionCatalogEntryXiangyu Yao2019-06-281-1/+0
|
* SERVER-39524 remove NamespaceString::virtualized() and friendsGabe Villasana2019-06-261-5/+0
|
* SERVER-41819 Move methods from KVCollectionCatalogEntry to KVCatalogXiangyu Yao2019-06-211-1/+2
|
* SERVER-39079 Move BackgroundOperation checks out of the catalog layer; add ↵Dianna Hohensee2019-03-241-0/+4
| | | | parallel IndexBuildsCoordinator checks for all BackgroundOperation checks
* Revert "SERVER-39079 Move BackgroundOperation checks out of the catalog ↵Dianna Hohensee2019-03-121-4/+0
| | | | | | layer; add parallel IndexBuildsCoordinator checks for all BackgroundOperation checks" This reverts commit d02edd5290131978f901ffc657bee3470d03f8fd.
* SERVER-39079 Move BackgroundOperation checks out of the catalog layer; add ↵Dianna Hohensee2019-03-111-0/+4
| | | | parallel IndexBuildsCoordinator checks for all BackgroundOperation checks
* SERVER-40023 remove background index support from IndexBuilderBenety Goh2019-03-071-1/+0
|
* SERVER-39505 Make ViewCatalog a decoration on Database.Divjot Arora2019-03-071-2/+3
|
* SERVER-39495 Move ShardingState::needCollectionMetadata under ↵Kaloian Manassiev2019-02-271-12/+16
| | | | | | | | | OperationShardingState ShardingState logically contains answers to questions about whether the current instance is node in a sharded cluster, whereas OperationShardingState is responsible for the 'shardedness' of the commands.
* SERVER-39560 - remove leading blank line on all C++ filesBilly Donahue2019-02-131-1/+0
| | | | | | Remove leading comments that are just stating the filename. Move any file-level comments below the copyright banner. Remove leading blank lines.
* SERVER-38316 Consolidate PlanExecutor::DEAD and PlanExecutor::FAILUREPawel Terlecki2019-02-041-6/+1
| | | | | Takes care of PlanExecutor states. In some cases we log more information for former DEAD state scenarios now.
* SERVER-39032 remove unnecessary NamespaceString::ns() calls from db/catalog/Benety Goh2019-01-241-15/+11
|
* SERVER-37444 Added RequiresCollectionStage and use for COLLSCAN.David Storch2018-10-311-59/+43
| | | | | | | This is a pure refactor with no user-facing changes. It is the first step in making PlanExecutors check their own validity during yield recovery, rather than requiring the invalidating actor to issue a kill notification.
* SERVER-37651 Update header files with new licenseRamon Fernandez2018-10-221-8/+10
|
* SERVER-36224 Refactor Collection::updateDocument argsJustin Seyster2018-08-261-0/+1
| | | | | | | | | Previously, Collection::updateDocument expected to get a namespace and UUID from its OplogEntryUpdateArgs, but that is not necessary, because the collection already knows its own namespace and UUID. This caused a problem in DurableViewCatalogImpl::upsert(), which did not set the UUID value in the args, leading to oplog entries without their UUID value.
* SERVER-32148 Make NamespaceNotFound an acceptable error for emptyCapped and ↵Chibuikem Amaechi2018-07-311-2/+2
| | | | | | | | convertToCapped Closes #1206 Signed-off-by: Siyuan Zhou <siyuan.zhou@mongodb.com>
* SERVER-35428 Added ability to add two OpDebug objects togetherjinichu2018-07-031-1/+1
|
* SERVER-33078 convertToCapped size is not checked for float -> long long overflowDianna Hohensee2018-06-041-2/+2
|
* SERVER-34307 replace invariant(false) with MONGO_UNREACHABLEBenety Goh2018-04-041-2/+2
|
* SERVER-33336 Snapshot reads should not take MODE_IX locks when autocommit=trueTess Avitabile2018-03-021-1/+1
|
* SERVER-29519 Remove getGlobalReplicationCoordinator. Replace when getting ↵Nick Zolnierz2018-03-021-1/+1
| | | | | | decoration through service context (global if needed). This reverts commit a8fddd07a740e959646995ef93139887b3b3eb5c.