summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/test_commands.cpp
Commit message (Collapse)AuthorAgeFilesLines
* SERVER-52556 Versioned CollectionCatalog. Writes are performed using ↵Henrik Edin2020-11-131-1/+1
| | | | | | | 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-1/+1
| | | | | | | | | | | 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-50984 Add CollectionPtr to replace usage of const Collection*Henrik Edin2020-09-261-1/+1
| | | | | | | | | | | | 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-3/+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-50317 Const correct uses of CollectionHenrik Edin2020-09-021-2/+2
| | | | | | 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-48228 Move slot-based execution engine and supporting changes into ↵Martin Neupauer2020-06-111-2/+5
| | | | | | | | | | | | | | 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-39140 Remove BackgroundOperationLouis Williams2020-05-261-1/+0
|
* SERVER-48084 Lint log lines in mongo/db/commandsSara Golemon2020-05-131-2/+3
|
* 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-45567 removing util/log.h where I canGabriel Russell2020-02-211-1/+0
| | | | | | | o converting some log lines that were missed o fixing some missing includes create mode 100644 src/mongo/transport/ismaster_metrics.cpp
* SERVER-45869 automatically converted structured loggingGabriel Russell2020-02-131-1/+4
|
* SERVER-43859: Take MODE_IX locks for collection creation.Daniel Gottlieb2019-11-261-1/+2
| | | | | | | | | | | | | | | | | 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-42560 Simplify passing of metadata between DocumentSource and PlanStageIan Boros2019-10-101-1/+1
|
* SERVER-41496 Remove Database::getCollection() and replace with ↵Evgeni Dobranov2019-09-301-1/+1
| | | | CollectionCatalog::get().lookupCollectionByNamespace()
* SERVER-41772 Apply clang-format 7.0.1 to the codebaseclang-format-7.0.12019-07-271-1/+1
|
* SERVER-42194 Make Collection always hold a UUID (rather than optional UUID)Xiangyu Yao2019-07-151-1/+1
|
* SERVER-40681 Make AutoGetCollection interface match AutoGetDBGregory Noma2019-06-181-1/+1
|
* SERVER-40724 Change namespace arguments to use NamespaceStringGeert Bosch2019-04-261-1/+1
|
* SERVER-39079 Move BackgroundOperation checks out of the catalog layer; add ↵Dianna Hohensee2019-03-241-0/+5
| | | | parallel IndexBuildsCoordinator checks for all BackgroundOperation checks
* Revert "SERVER-39079 Move BackgroundOperation checks out of the catalog ↵Dianna Hohensee2019-03-121-5/+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/+5
| | | | parallel IndexBuildsCoordinator checks for all BackgroundOperation checks
* SERVER-40023 remove background index support from IndexBuilderBenety Goh2019-03-071-1/+0
|
* SERVER-39560 - remove leading blank line on all C++ filesBilly Donahue2019-02-131-3/+0
| | | | | | Remove leading comments that are just stating the filename. Move any file-level comments below the copyright banner. Remove leading blank lines.
* SERVER-37651 Update header files with new licenseRamon Fernandez2018-10-221-26/+28
|
* SERVER-33889 Separate sleep from shell_commands so the capi unittests don't ↵Henrik Edin2018-05-171-92/+0
| | | | drag in new commands.
* SERVER-34653 MONGO_REGISTER_TEST_COMMANDBilly Donahue2018-05-161-12/+7
|
* SERVER-34628 Really remove appendCommandStatusMathias Stearn2018-05-081-19/+13
| | | | | | | | | | All remaining callers are transitioned to some form of usassert. This was done with an elaborate set of vim macros to make this tractable. Therefore it should not be considered an example of the best way to write new code, just as an improvement on what was there before. In particular, I couldn't easily remove Status's that are named then only used once in uassertStatusOK, nor could I convert the pattern of checking a StatusWith<T>'s getStatus() then calling getValue() to just call uassertStatusOK(returnsStatusWith()).
* SERVER-33889 Split dcommands and core into libraries for embedded vs ↵Henrik Edin2018-03-231-0/+1
| | | | standalone process applications. Refactored commands libraries throughout the codebase and made their uses be LIBDEPS_PRIVATE when possible as most commands don't export any symbols and don't even have headerfiles.
* SERVER-33892 Separate test_commands_enabled libraryBilly Donahue2018-03-141-1/+1
|
* SERVER-29519 Remove getGlobalReplicationCoordinator. Replace when getting ↵Nick Zolnierz2018-03-021-1/+0
| | | | | | decoration through service context (global if needed). This reverts commit a8fddd07a740e959646995ef93139887b3b3eb5c.
* Revert "SERVER-29519 Remove getGlobalReplicationCoordinator. Replace when ↵Nick Zolnierz2018-03-021-0/+1
| | | | | | getting decoration through service context (global if needed)." This reverts commit 7d37a75df3f6035a7afcb51123b88f0e99308fc8.
* SERVER-29519 Remove getGlobalReplicationCoordinator. Replace when getting ↵Henrik Edin2018-03-021-1/+0
| | | | decoration through service context (global if needed).
* SERVER-33286 Provide service context in Command::secondaryAllowed to allow ↵Henrik Edin2018-02-141-4/+4
| | | | getting interfaces without using global get function.
* SERVER-33136 const-ify the command auth accessorsBilly Donahue2018-02-061-4/+4
|
* SERVER-32958 unrevert "SERVER-32958 slaveOk,slaveOverrideOk replacement"Billy Donahue2018-01-311-8/+8
| | | | | | w/fix: update a new command to secondaryAllowed This reverts commit d75cb425fbc3cf4b569eb1722c3f8abec45654a2.
* Revert "SERVER-32958 slaveOk,slaveOverrideOk replacement"Judah Schvimer2018-01-311-8/+8
| | | | This reverts commit be24b0323d3f2d424d9e22337f4221d39001ac31.
* SERVER-32958 slaveOk,slaveOverrideOk replacementBilly Donahue2018-01-311-8/+8
| | | | declare read_preference dep. update service_entry_opint_embedded
* SERVER-32958 Command::help() returns std::stringBilly Donahue2018-01-301-11/+11
|
* SERVER-32646 CommandHelpersBilly Donahue2018-01-161-12/+12
|
* SERVER-29731 get errmsg out of BasicCommand apiMathias Stearn2017-07-131-10/+7
| | | | It is now only used by commands deriving from ErrmsgCommandDeprecated.
* SERVER-29731 convert all direct subclasses of Command to BasicCommandMathias Stearn2017-07-131-8/+8
|
* SERVER-28912 Thread statement id from batched insert command oplog entryRandolph Tan2017-07-121-1/+1
|
* SERVER-19318 Avoid taking any locks for collectionless aggregations without ↵Bernard Gorman2017-07-071-3/+3
| | | | foreign namespaces
* SERVER-29260 Make BSONObj argument to Command::run() const&Mathias Stearn2017-05-171-4/+4
|
* SERVER-28579 require MODE_X collection lock in Collection::cappedTruncateAfter()David Storch2017-04-181-9/+10
|
* SERVER-25694 Eliminate race in PlanExecutor cleanup.Charlie Swanson2017-04-131-6/+2
| | | | | | | | | | | Ensures that a collection lock is held in at least MODE_IS while deregistering a PlanExecutor from the cursor manager. Introduces new PlanExecutor::dispose() and ClientCursor::dispose() methods that must be called before destruction of those classes, and ensures they are called before destruction. These calls will thread an OperationContext all the way through to DocumentSource::dispose() for each stage in a Pipeline, which will give DocumentSourceCursor a chance to acquire locks and deregister its PlanExecutor if necessary.
* SERVER-28701 Remove queryOptions argument from Command::run()Mathias Stearn2017-04-121-4/+0
|
* SERVER-28543 Add OperationContext as an argument to getCollectionMaria van Keulen2017-04-061-1/+1
|
* SERVER-22541 Refactor RAII locking helpers.Charlie Swanson2017-03-151-6/+3
| | | | | | | | | Removes the class 'ScopedTransaction' and moves the responsibility of abandoning the snapshot onto the GlobalLock class. Also renames the AutoGetCollectionForRead class to AutoGetCollectionForReadCommand, and adds a new AutoGetCollectionForRead class. Unlike AutoGetCollectionForReadCommand, this new class will not update the namespace on the CurrentOp object, nor will it add an entry to Top.
* SERVER-27938 Rename all OperationContext variables to opCtxMaria van Keulen2017-03-071-27/+27
| | | | | | This commit is an automated rename of all whole word instances of txn, _txn, and txnPtr to opCtx, _opCtx, and opCtxPtr, respectively in all .cpp and .h files in src/mongo.