Known Issues
5279 tracked MongoDB server issues from Jira with status, affected versions, and resolution details.
SERVER-32156Needs Scheduling
Linear field lookup in update subsystem can lead to an individual update having quadratic time complexity
We had some erroneous data enter our system and get written to a mongo collection. It resulted in a document containing over 600,000 attributes in it. When a find or update was attempted on this document the mongo server master went to 200% CPU and all other work ground to a halt. We attempted to kill the operation but it would not stop. It seemed that the operation was holding locks and was not yielding. Here is a sample of what the currentOp() looked like for the operation:
Note that we
Components
Performance
Affected Versions
3.2.163.4.63.6.0
SERVER-139258Needs Scheduling
Infer prefix types according to dotted-path transformation semantics
Inclusion projections, exclusion projections and computed assignments have different effects on scalar, missing, object and array prefixes.
Prefix type inference needs to distinguish these operations rather than retain only whether a prefix can be an array. The current expectations lose known scalar types, retain missing alternatives for fields that are guaranteed to exist, and retain array alternatives after a later match rules out prefix arrays.
Inclusion
[\{$set: {p: 1}}, \{$project:
SERVER-137992In Code Review
Adjust Monguard's release pipeline to be compatible with new Evergreen project and branch
Currently release version string depends on build order id generated by Evergreen project. This work should also remove this dependency so that the version string has no dependency on Evergreen project.
SERVER-130149In Code Review
Allow a running index build to pick up an increased maxIndexBuildMemoryUsageMegabytes value after a spill boundary
h2. Problem
Today, when an index build enters a bad spill/merge-spill pattern, the operator may only discover that the configured memory limit is too low after the build has already started. In related cases, this has been called out as a practical problem because the need to raise {{maxIndexBuildMemoryUsageMegabytes}} often only becomes obvious once index builds are already in progress, at which point recovery can require restarting the broader operation.
We also have evidence of index-buil
SERVER-134639In Progress
Support CE for clustered collection scans
We currently [do not|https://github.com/mongodb/mongo/blob/d9680f2c54db61b54cf7bc59a1028d1cfc1590ed/src/mongo/db/query/compiler/optimizer/cost_based_ranker/cardinality_estimator.cpp#L403] support CE for clustered collection scans.
Most notably, we would need to respect [CollectionScanNode::rangeList|https://github.com/mongodb/mongo/blob/9cfd2ac212862227bff786f2fa6101e15641ced0/src/mongo/db/query/compiler/physical_model/query_solution/query_solution.h#L591]
Perhaps we can re-use the current
SERVER-131871ClosedDuplicate
Optimize multi-field updates on wide documents: avoid repeated linear child lookups in UpdateObjectNode
Updating many fields of a wide document (an object with a large number of sibling fields) is {{O(n^2)}} in the number of fields, because each targeted field is located with an independent linear {{mutablebson::Element::findFirstChildNamed()}} scan over the same sibling chain.
This proposal adds a per-{{{}apply(){}}}, target-only field-name index so those repeated lookups become {{{}O(1){}}}, reducing the overall cost from {{O(n^2)}} to {{{}O(n){}}}. It is guarded by a runtime-tunable threshol
SERVER-127646Backlog
Document and enforce invariants of the vector clock
During the code review of SERVER-126262, we realized that we don't have documentation or enforcement of the vector clock's invariants that are relied upon for correctness by other components.
One of these invariants is that a bumped topology time cannot be gossiped out without a bumped config time, since the config time is used by the shard registry as the afterClusterTime to read the new entries in config.shards.
Another invariant documented sporadically in the code is that the operationT
SERVER-138751ClosedFixed
Make txn unwind stage create all endOfTransaction events
Make the change stream txn unwind stage generate all {{endOfTransaction}} events.
For prepared coordinated transactions, the stage creates {{endOfTransaction}} accounting control events, and makes these control events trickle down to the already-existing {{ChangeStreamEndOfTransaction}} stage, which will ultimately handle them.
This also requires a bypass of accounting control events in the {{ChangeStreamHandleTopologyChangeV2}} stage, because that stage will otherwise read such events and t
Components
Change streams
Fixed Versions
9.1.0-rc09.1.0-rc1025
SERVER-96816Open
Extend CardinalityEstimator::estimate(const IndexBounds*) for simple ranges
Extend
to handle the case
SERVER-134643Needs Scheduling
Add CE support for text queries
We currently [do not support|https://github.com/mongodb/mongo/blob/d9680f2c54db61b54cf7bc59a1028d1cfc1590ed/src/mongo/db/query/compiler/optimizer/cost_based_ranker/ce_utils.cpp#L83] them.
SERVER-138067ClosedFixed
Filter match expressions by path in narrowType
From the benchmarks added in SERVER-137775.
On refers to type inference flag being on.
This is the time taken for a single canPathBeArray call on path 'x' in various pipelines.
|Benchmark|Size|Off|On|
|UnrelatedPredicates|10 / 100 / 1000|0.031|3.41 / 97.2 / 7950|
|UnrelatedSubpathPredicates|10 / 100 / 1000|0.031|4.68 / 112 / 8218|
|UnrelatedMatches|10 / 100 / 999|about 0.055|3.46 / 99.7 / 8014|
In all three cases, type inference evaluates all 999 or 1000 predicates even though only
Fixed Versions
9.1.0-rc09.1.0-rc1026
SERVER-139155ClosedFixed
Add server parameters that control the backfill
h3. Summary
Add two router-side server parameters that bound on-demand lookback ("backfill") for endOfTransaction change events, per the design doc "Emit End-of-Transaction Events with Shard Targeting Support" (sections "Maximum lookback distance" and "Rebuild cap"). Both are settable globally and overridable per change stream via query settings.
h3. Parameters
||Server parameter||Query settings wire name||Bounds||
|internalChangeStreamEndOfTransactionMaxLookbackSeconds|changeStreamEndOf
Fixed Versions
9.1.0-rc09.1.0-rc1026
SERVER-115957In Code Review
Use a gossiping executor during addShard once precondition checks complete
During addShard, we use an executor which does not gossip the vector clock to communicate with the replica set to be added. See SERVER-105324 for more details on this but TLDR is that doing otherwise can cause the config server to have too high of a config time after a failed addShard.
This ticket is to investigate whether, now that we have a coordinator, it might be safe to use the executor with gossiping once we are in a phase which must always make progress. In theory, here we know th
Affected Versions
8.3.0-rc0
SERVER-101240Needs Scheduling
Costing of distinct scan
After SPM-3182, the plan enumerator can generate multiple distinct scan plans. CBR needs the ability to cost such plans.
SERVER-99075Needs Scheduling
CE of distinct scan
After SPM-3182, the plan enumerator can generate multiple distinct scan plans. CBR needs the ability to cost such plans.
SERVER-134637ClosedFixed
CE of wildcard/hashed/collated index scans
We currently [do not|https://github.com/mongodb/mongo/blob/d9680f2c54db61b54cf7bc59a1028d1cfc1590ed/src/mongo/db/query/compiler/optimizer/cost_based_ranker/cardinality_estimator.cpp#L442] support these with CBR.
Fixed Versions
9.1.0-rc09.1.0-rc1026
SERVER-98577ClosedFixed
Identify and sample Fetch --> Index Scan plan fragments
Another solution to the "double counting" problem described in SERVER-98576 could be to sampling Fetch -> Index Scan plan fragments using the Sampling estimators estimateRIDs functionally which takes both index bounds and an optional filter.
Fixed Versions
9.1.0-rc0
SERVER-139252Needs Scheduling
CE of sparse index scans
We currently [do not|https://github.com/mongodb/mongo/blob/d9680f2c54db61b54cf7bc59a1028d1cfc1590ed/src/mongo/db/query/compiler/optimizer/cost_based_ranker/cardinality_estimator.cpp#L442] support CEing sparse indices.
SERVER-134644Blocked
Add costing support for text queries
It very likely does not have to be particularly accurate due to the following:
* the current cost models we have all sum up child nodes' costs in a telescoping fashion
* text QSNs exist as leaf nodes identically across all solution candidates for a given query.
Note that we do need a good outCE estimate (as parent nodes use them in a non-linear manner for their cost estimations). That is tracked in SERVER-134643.
SERVER-134641Blocked
Add costing support for geo queries
We will need to come up with a cost model first.