summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/query_stage_merge_sort.cpp
Commit message (Collapse)AuthorAgeFilesLines
* SERVER-59854 Remove PlanCacheIndexabilityState from the PlanCacheRuoxin Xu2021-09-241-0/+1
| | | | | | | | | | This patch includes a number of changes to facilitate the use of PlanCacheIndexabilityState with SBE and classic plan cache keys. * Introduced a plan cache key factory. * Moved PlanCacheIndexabilityState from the PlanCache into CollectionQueryInfo. * Templetized QueryPlanner::planSubqueries() so it can be used with classic and SBE plan caches. * Removed dependency on the CanonicalQuery from the PlanCache class. Co-authored-by: Anton Korshunov <anton.korshunov@mongodb.com>
* SERVER-57127 WorkingSetCommon::fetch() accepts CollectionPtrBenety Goh2021-06-041-2/+2
|
* SERVER-57127 IndexScanParams accepts CollectionPtrBenety Goh2021-06-031-19/+20
| | | | (cherry picked from commit e312afb89845be565feac879750b78a45abd3b0c)
* SERVER-55887 remove unowned_ptrBilly Donahue2021-04-211-1/+1
|
* SERVER-50754 introduce MakeBSONObjStage and various perf improvements to SBEIan Boros2021-01-191-9/+21
|
* SERVER-52556 Versioned CollectionCatalog. Writes are performed using ↵Henrik Edin2020-11-131-10/+10
| | | | | | | 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-10/+10
| | | | | | | | | | | 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-51120 Find queries with MERGE_SORT incorrectly sort the results when ↵Mindaugas Malinauskas2020-10-021-11/+12
| | | | the collation is specified
* SERVER-50984 Add CollectionPtr to replace usage of const Collection*Henrik Edin2020-09-261-12/+12
| | | | | | | | | | | | 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-50317 Const correct uses of CollectionHenrik Edin2020-09-021-12/+12
| | | | | | 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-41/+49
| | | | | | 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-16/+40
| | | | | | | | | | | | | | 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-47873 Eliminate the Collection* saved in IndexDescriptorGeert Bosch2020-06-101-18/+19
|
* SERVER-46921 make collection of timing info opt in in PlanStageIan Boros2020-04-131-8/+8
|
* SERVER-45406 Plumb ExpressionContext through PlanStageIan Boros2020-02-281-38/+42
| | | | This patch includes also moves ownership of the collator to the ExpressionContext.
* SERVER-40620 uassert and log when fetching dangling index entryJustin Seyster2020-01-171-1/+3
| | | | | | | | | | | | If a FETCH_STAGE encounters a record id that does not reference any existing documents, that means either the document was deleted since query execution encountered the index entry or their is corruption somewhere. If the snapshot id indicates that the query has not yielded since the time that the index entry was loaded, that leaves corruption as the only possibility. We return and error and write to the log with instructions on how to address potentially inconsistent data. create mode 100644 jstests/noPassthrough/query_yields_catch_index_corruption.js
* SERVER-43859: Take MODE_IX locks for collection creation.Daniel Gottlieb2019-11-261-10/+20
| | | | | | | | | | | | | | | | | 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-43367 unittest framework refactor/fixesBilly Donahue2019-10-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Segregate old-style dbtests into their own Suite initialization system: OldStyleSuiteSpecification. This is where the funky deprecated features can live on without interfering with the Suite API. It also gives us a searchable base class to identify them in the future. OldStyleSuite has `setupTests()` and an `add<T>()` that Suite does not have. Suite API can shrink when it doesn't have to support these dbtest adaptor features. Suite only needs non-template `add(name, callback)`. - Add OldStyleSuiteInitializer to some dbtests that were missing it! These didn't use SuiteInstance to register themselves and were incorrect. They would self register, resulting in _allSuites() holding a std::shared_ptr to a static-duration Suite object! - Change `getSuite()` to return `Suite&` instead of `Suite*`. - No more "self-registering" in Suite constructor. Registration must be done as a separate post-construction step. This removes some unusual lifetime management code and is easier to document. Suite::getSuite(name) is the only way to make a Suite, and it does the make_shared and registration calls with a pseudo-private ConstructorEnable idiom. - Suite->run() returns std::unique_ptr<Result> instead of raw `Result*`. It's virtual to support OldStyleSuite behavior. - Suite._ran does nothing. Removed. - Result.cur does nothing. Removed. - Switch to pass-by-value and std::move for most ctor args. - Add explicit on 1-arg ctors. - Get rid of TestHolder. It's just a 2-field struct. - use fmt instead of snprintf - TEST and TEST_F macros: generate TEST_TYPE once. - TEST and TEST_F macros: inline the _agent variable. - Mark _doRun as `override`. - Terminology: replace CASE_NAME with SUITE_NAME. - rename DeathTestImpl -> DeathTestBase - move getDeathTestPattern into the test as a static member function - refactor out some repetition from the comparator decl macros - use if-constexpr and diamond relops to clean up the ComparisonAssertion class. - dbtests: conditionally skip some add<T> calls - further dedup (DEATH_)TEST(_F) macros
* SERVER-41496 Remove Database::getCollection() and replace with ↵Evgeni Dobranov2019-09-301-10/+10
| | | | CollectionCatalog::get().lookupCollectionByNamespace()
* SERVER-42852 Make PlanStage consistently hold children by unique_ptr.David Storch2019-09-041-37/+44
|
* SERVER-42181 Make WorkingSetMember hold Document instead of BSONObjMartin Neupauer2019-08-291-4/+4
| | | | SERVER-42157 Unowned mode for Document/Value
* SERVER-41772 Apply clang-format 7.0.1 to the codebaseclang-format-7.0.12019-07-271-2/+2
|
* Revert "SERVER-40620 fassert during document fetch when there is evidence of ↵Misha Ivkov2019-07-111-2/+0
| | | | | | index corruption" This reverts commit cf6ffa0d0b72574bf6fee66a46e1b264c0cc6d63.
* SERVER-40620 fassert during document fetch when there is evidence of index ↵Misha Ivkov2019-07-111-0/+2
| | | | corruption
* SERVER-41071 Replace NULL and 0 with nullptrA. Jesse Jiryu Davis2019-06-141-38/+38
|
* SERVER-39339 Remove `stdx/memory.h`ADAM David Alan Martin2019-06-101-5/+6
|
* SERVER-40724 Change namespace arguments to use NamespaceStringGeert Bosch2019-04-261-20/+24
|
* 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-38091 IndexCatalog iterators and accessors should return const entriesLouis Williams2018-12-191-2/+2
|
* SERVER-37447 Introduce RequiresIndexStage and use for IXSCAN.David Storch2018-11-271-1/+1
|
* SERVER-37446 Change PlanStages which don't require a collection to avoid ↵David Storch2018-11-071-10/+10
| | | | | | | keeping a Collection*. In order to prevent COUNT stage from requiring a Collection*, splits fast count into a new RECORD_STORE_FAST_COUNT stage.
* SERVER-37651 Update header files with new licenseRamon Fernandez2018-10-221-14/+16
|
* SERVER-16857 Delete MMAPv1 diskloc invalidations.David Storch2018-08-291-14/+32
| | | | | | - Removes of PlanStage::invalidate(). - Removes RecordCursor::invalidate() from the storage API. - Removes CursorManager::invalidateDocument().
* SERVER-35500 Implement special bounds generation for allPaths indexesBernard Gorman2018-08-101-81/+31
|
* SERVER-35115 Separate dbclientinterface.h into several parts, one per class.Henrik Edin2018-06-291-1/+1
|
* SERVER-35516 Get rid of OldClientWriteContextKaloian Manassiev2018-06-151-11/+11
|
* SERVER-30353 Create an index observer to notify us of changes made to index ↵Gregory Wlodarek2017-08-091-0/+1
| | | | and document keys
* SERVER-25694 Eliminate race in PlanExecutor cleanup.Charlie Swanson2017-04-131-16/+16
| | | | | | | | | | | 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-28543 Add OperationContext as an argument to getCollectionMaria van Keulen2017-04-061-10/+10
|
* SERVER-27938 Rename all OperationContext variables to opCtxMaria van Keulen2017-03-071-82/+82
| | | | | | 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.
* SERVER-26033 Allow simple range to exclude start keyJudah Schvimer2016-09-151-11/+11
|
* SERVER-24508 BSONObj::ComparatorInterfaceDavid Storch2016-08-181-3/+3
| | | | | | | | | | | BSONObj instances should now be compared via the comparator interface's evaluate() method. This preferred over using BSONObj::woCompare() directly. If the comparison doesn't require any database semantics (e.g. there is no collation), there is a global instance of the SimpleBSONObjComparator which should be used for BSONObj comparisons. If the comparison requires special semantics, then callers must instantiate their own comparator object.
* SERVER-24239 Allow creation of indexes with the same key pattern.David Hatch2016-07-281-1/+3
|
* SERVER-23779 Replace direct instantiation of OperationContextImpl with ↵Andy Schwerin2016-04-201-2/+5
| | | | | | | cc().makeOperationContext(). Also, make OperationContextImpl's constructor private so that it can only be constructed via a Client.
* Revert "SERVER-23779 Replace direct instantiation of OperationContextImpl ↵Eric Milkie2016-04-191-5/+2
| | | | | | with cc().makeOperationContext()." This reverts commit 0ab34aa7b9c3c48ea6cf17888620fca455284d35.
* SERVER-23779 Replace direct instantiation of OperationContextImpl with ↵Andy Schwerin2016-04-181-2/+5
| | | | | | | cc().makeOperationContext(). Also, make OperationContextImpl's constructor private so that it can only be constructed via a Client.
* SERVER-23350 Make the SORT_MERGE PlanStage respect the query's collationTess Avitabile2016-04-111-0/+150
|
* SERVER-18826 Rename WorkingSet State Names from LOC to RIDJames Wahlin2016-02-051-15/+15
| | | | | | Also renamed: * WorkingSetMember::hasLoc() -> WorkingSetMember::hasRecordId * WorkingSetMember::loc -> WorkingSetMember::recordId
* SERVER-15962 only use KEEP_MUTATIONS for index intersection plansDavid Storch2016-01-131-19/+116
| | | | It is no longer required for other plans.
* SERVER-16444 Copy data in the query subsystem as needed.Max Hirschhorn2015-08-241-0/+4
| | | | | | | | | | | A WorkingSetMember in the LOC_AND_OBJ state must be made owned when: 1. Its WorkingSetID is cached across multiple calls to work(). 2. Multiple calls to next(), seekExact(), saveState(), etc. are performed on the same WiredTiger cursor in a single work() call. No longer necessary to always copy data out of WiredTiger buffers.