summaryrefslogtreecommitdiff
path: root/src/mongo/db/query
Commit message (Collapse)AuthorAgeFilesLines
* SERVER-46721 Secondary readers should read at the no-overlap time instead of ↵Louis Williams2020-08-062-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lastApplied The no-overlap time, ReadSource::kNoOverlap, is the minimum of replication's lastApplied timestamp and WiredTiger's all_durable time. This time is independent of replication state and ensures queries do not see oplog holes after state transitions from secondary to primary. (cherry picked from commit 25c694f365db0f07a445bd17b6cd5cbf32f5f2f9) (cherry picked from commit 5ddf9db5635e4af2d1295bd2f1007e86d517c6c2) SERVER-44529 Query yield recovery after a stepdown should switch to read at the no-overlap time After yielding and reacquiring locks in a query, the preconditions that were used to select our ReadSource initially need to be checked again. Queries hold an AutoGetCollectionForRead RAII lock for their lifetime, which may select a ReadSource based on state (e.g. replication state). After a query yields its locks, this state may have changed, invalidating our current choice of ReadSource. (cherry picked from commit b3a5b5258a487006f0487b9e7e0a1d0d4f1119ff) (cherry picked from commit ce57ddce19e642401ec1b56871b3a9402116ccfc) SERVER-48475 Reimplement lastApplied for secondary reads This partially reverts work to use the kNoOverlap ReadSource on secondaries since the all_durable calculation is unnecessary and expensive. (cherry picked from commit ff92d4435fa75c2b947c49cffaf48805b320a5ae) (cherry picked from commit 4e3f3b96826772baa777b7563b38574c1e11c2e4)
* SERVER-48993 explodeForSort can produce incorrect query planMindaugas Malinauskas2020-08-042-0/+167
| | | | (cherry picked from commit 7dd37622622362d0ef689b91de565c8c053c838e)
* SERVER-45233 Indexed array inequality fixed to use correct boundsTed Tuckman2020-07-151-46/+107
| | | | | | | create mode 100644 jstests/core/array_comparison_correctness.js create mode 100644 jstests/core/array_index_and_nonIndex_consistent.js (cherry picked from commit 52e7950cae37ef3783b05840c04abbbe383fa1ff)
* SERVER-35921 Make IXSCAN use the proper MinKey/MaxKey bounds on LT and GTMisha Ivkov2020-07-154-11/+27
| | | | (cherry picked from commit b1285a2acb60cbf7c268cb5499fbf5d674d490b2)
* SERVER-48614 Fix plan cache discriminators for partial wildcard indexesDavid Storch2020-06-164-28/+215
| | | | | | | | | | | | | | | | | | Previously, discrimination based on the partial filter expression was done for all paths included in the wildcard projection. This could lead to a situation where two queries were erroneously assigned the same plan cache key. The fix is to ensure that for wildcard indexes, partial index discriminators are instead registered only for those paths mentioned in the partial filter expression. Unlike other kinds of wildcard index discriminators (e.g. handling concerns of null equality or collation), the paths in the partial filter expression are known a priori. Therefore, discrimination based on the partial filter can be done in the same way for wildcard and non-wildcard indexes. (cherry picked from commit 57edf434219c9659354f01fb6bf4f4e6c0370bc4)
* SERVER-47773 Error consistently when tailable cursors and $near are used ↵Drew Paroski2020-05-272-1/+7
| | | | | | | together (cherry picked from commit c8ced6df8f620daaa2e539f192f2eef356c63e9c) (cherry picked from commit e9c31e791b2e056c016c048d7e21c59e0e2452ea)
* SERVER-45508 Fix crash when planning collated sort within multi point intervalDavid Percy2020-03-312-8/+21
|
* SERVER-40805 Indicate reason for replanningDavid Percy2020-03-312-2/+2
|
* SERVER-39241 Apply noFetchBonus iff no FETCH stage; disregard PROJECTIONDavid Percy2020-03-312-7/+81
|
* SERVER-45137 Remove namespaces from Top when collections are renamedGregory Wlodarek2020-02-111-2/+2
| | | | | | | | create mode 100644 jstests/noPassthroughWithMongod/top_rename.js (cherry picked from commit c2d35dd6214978959a9cfc5dcb813d62ae8981ef) create mode 100644 jstests/noPassthroughWithMongod/top_rename.js
* SERVER-41872 PlanEnumerator AndAssignment::choices ordering not stable and ↵James Wahlin2020-02-072-2/+72
| | | | | | is relevant to set of plans generated (cherry picked from commit 6ca9be706ce03a2c79d29feac3cfd294cc09445d)
* SERVER-45152 Clean up git merge to unit testJacob Evans2020-01-151-1/+1
|
* SERVER-45152 Demote invariant to massert to prevent server crashesJacob Evans2020-01-142-4/+32
|
* SERVER-43349 Accommodate double $nots during serializationCharlie Swanson2019-12-191-1/+1
| | | | (cherry picked from commit 4d1ce1b892eef6f3926548a7b34d020a02eaee8a)
* SERVER-44869 Add query knobs for $push and $addToSet memory limitsCharlie Swanson2019-12-091-0/+22
| | | | (cherry picked from commit f7d0d2f3d6fe9e4c472bd1d8893c8b6dc96881b6)
* SERVER-43860 Always upsert exact source document for pipeline-insert $merger4.2.2-rc0Bernard Gorman2019-12-032-5/+14
| | | | | (cherry picked from commit 23e55cb3d041236f399f7095df31cd3e3da491cc) (cherry picked from commit 70ef84cd14388602b3d763b12c6f8448ba62a9d8)
* SERVER-44377 generate correct plan for indexed inequalities to nullIan Boros2019-11-133-54/+171
|
* SERVER-38691 Include serverInfo in explain output for aggregation and shardingDavid Percy2019-11-115-20/+101
|
* SERVER-42165 Replace uses of stdx::mutex with mongo::MutexBen Caimano2019-11-015-21/+19
|
* SERVER-40546 Fix min/max boundary checkingIan Boros2019-10-291-2/+4
|
* SERVER-43202 propagate errors from interrupts during yieldingIan Boros2019-10-044-19/+28
|
* SERVER-40466 Unify checks for being in a multi-document transactionSamyukta Lanka2019-09-242-16/+7
| | | | | | | | | | | | (cherry picked from commit 77967c90b1a521108c052af235ce7de9742aa95e) SERVER-42755 recover_prepared_txn_with_multikey_write.js should verify absence of prepare conflicts on catalog after restart. (cherry picked from commit eaf81228328738b685532c7eb10f833362434061) SERVER-42750 Set opCtx->inMultiDocumentTransaction() in transaction recovery. (cherry picked from commit 16c17677704a4f979381d593106a0c356088fd30)
* SERVER-42837 Allow waitInFindBeforeBatch FailPoint to take data.nss parameterBen Caimano2019-09-175-4/+37
|
* SERVER-40258 Relax locking requirements for sharding metadata refresh on shardsRandolph Tan2019-09-132-10/+3
| | | | (cherry picked from commit 0d07bf5e7a72a5bce3f7d7d681a71d7ecfe7eb8c)
* SERVER-40382 Add a serverStatus metric to report plan cache memory consumptionArun Banala2019-08-266-83/+421
| | | | (cherry picked from commit 5105fa2377d3e86b2011691d5acbd8c531113929)
* SERVER-42518 Prevent paths with successive array indexes from using a ↵David Storch2019-08-222-50/+119
| | | | | | | | | | | | | | | | | | | | | | | | wildcard index. Consider a query on a generic path "c1.c2...arr.0.1...cn" consisting of n path components. Somewhere in the middle of this path, there is a component "arr" that is known to be multikey, followed by multiple successive array indexes ("0" and "1" in this example). Any predicate whose path matches this description cannot correctly be answered with a wildcard index. This is because wildcard indexes do not recursively expand directly nested arrays. That is, when indexing an array such as [[1, 2], [3, 4]], the index keys will be [1, 2] and [3, 4], as opposed to 1, 2, 3, and 4. Since the index does not contain keys for individual nested array elements, it cannot be cheaply used for queries against nested array elements. This change fixes the planner to avoid attempting to use a wildcard index in such cases, thereby fixing a query correctness bug. (cherry picked from commit 0f0463d0442b2c77cb650a8e84fea4d634fb63e6)
* Apply formatting per `clang-format-7.0.1`clang-format-7.0.12019-07-2651-925/+498
|
* SERVER-42291 generate correct bounds for $nin null queriesIan Boros2019-07-233-7/+55
| | | | (cherry picked from commit bf8fcb05e020e8eb7b99a3ca7667e0d5a289c873)
* SERVER-41829 findAndModify ignores filter expressions that are not objectsArun Banala2019-07-122-3/+57
| | | | (cherry picked from commit de511c6bbf22d662912f228a3ac7a8e7a8bc3c61)
* SERVER-40717 Remove CollectionCatalogEntry and KVColletionCatalogEntryXiangyu Yao2019-07-031-3/+1
| | | | (cherry picked from commit 2597e7fbe3c09683408b82b8b854023d6c2dbbf2)
* SERVER-1599 Fix lintBlake Oler2019-07-032-2/+2
| | | | (cherry picked from commit cc59938cb51628b33403b19afd4cf9ba70c25921)
* SERVER-1599 Add support for index hint to update commandXin Hao Zhang2019-07-039-43/+266
| | | | (cherry picked from commit 90da71501d23dc1b5a3d78417079fd62e989e035)
* SERVER-40383 Handle week, day edge cases in timelib_date_from_isodateJustin Seyster2019-07-011-0/+56
| | | | (cherry picked from commit d4843fc49931c7ce4332dc373623267c293eb518)
* SERVER-40810 give precedence index filter > hint > index on DISTINCT_SCANMisha Ivkov2019-07-011-12/+36
| | | | (cherry picked from commit 95975c0e9c725ef86ef2fe6a8f5372e8a3f219d3)
* SERVER-41589 OplogStartHack should use the requested yield policy.Justin Seyster2019-06-211-3/+5
| | | | (cherry picked from commit 86b07826cede4cfd33e1a47f10a111b1d96e9758)
* SERVER-41583 Refactor the registration and de-registration of collection and ↵Xiangyu Yao2019-06-201-2/+1
| | | | | | catalog entry (cherry picked from commit 5eda33f9fa40a1a17f9f63f904a8c147700d648c)
* SERVER-23923 Track writeConcern through getMoresCharlie Swanson2019-06-031-0/+8
|
* SERVER-23831 Remove fastmodinsertXin Hao Zhang2019-05-311-1/+0
|
* SERVER-41222 TransactionHistoryIterator should not yield PBWM lockJustin Seyster2019-05-242-4/+9
|
* SERVER-41238 Allow $$NOW and $$CLUSTER_TIME to be used in the find commandBernard Gorman2019-05-246-40/+128
|
* SERVER-40407 Add support for $$NOW and $$CLUSTER_TIME in the findAndModify ↵Bernard Gorman2019-05-193-0/+64
| | | | command
* SERVER-40239 New alias: $replaceWith => $replaceRootCharlie Swanson2019-05-151-4/+4
|
* SERVER-40134 fix bug in distinct() against viewsIan Boros2019-05-142-10/+129
|
* SERVER-40005 Fix FindAndModifeRequest::bypassDocumentValidation/writeConcernPawel Terlecki2019-05-133-44/+118
| | | | | Handle bypassDocumentValidation and writeConcern inside the request like in other writeops.
* SERVER-40405 Add support for 'sort' option in combination with a ↵James Wahlin2019-05-081-8/+3
| | | | pipeline-style findAndModify
* SERVER-40404 Add support for 'fields' option in combination with a ↵James Wahlin2019-05-081-4/+0
| | | | pipeline-style findAndModify
* SERVER-40892 Rename UUIDCatalog to CollectionCatalogGeert Bosch2019-05-074-8/+8
|
* SERVER-40399 Test support for 'collation' option in combination with a ↵James Wahlin2019-05-071-4/+0
| | | | pipeline-style findAndModify
* SERVER-40465 $group will not distinct scan multikey indexIan Boros2019-05-033-0/+98
|
* SERVER-40397 Add pipeline updates to findAndModifyCharlie Swanson2019-04-304-39/+123
| | | | | | Adds the ability to specify an array representing an aggregation pipeline to the 'udpate' argument of findAndModify. Certain options like 'sort' and 'fields' are not yet supported.