Known Issues
5279 tracked MongoDB server issues from Jira with status, affected versions, and resolution details.
SERVER-137980ClosedDone
Migration should not re-validate documents when applying mods in steady state
Since migrations are transferring documents that have already been inserted it should not re-validate documents when applying mods in the steady state.
See [this BF comment |https://jira.mongodb.org/browse/BF-46514?focusedCommentId=9057824&focusedId=9057824&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-9057824]for more context.
Fixed Versions
9.1.0-rc09.1.0-rc1026
SERVER-131928In Progress
Capture cursor read failures on mongos in query stats
Sub-ticket for SERVER-87657.
Add the mongos analogue (mongod: SERVER-131927) for sharded getMore failures, where the query-stats key lives on ClusterClientCursor. Router-level or propagated shard error with allowPartialResults:false should update query stats error metrics.
SERVER-139262Backlog
Remove skipEnforcingHashCorrectness from txn_abort_in_progress_transactions_on_step_up.js
SERVER-139069ClosedFixed
Enable block_replica_set_writes_write_concern.js in no_passthrough_disagg_override_replsets
The test verifies that replica set write blocking remains enabled after a primary re-election. Currently, the test created a three-node replica set without specifying member priorities. The DSC passthrough assigns priority 1 to the initial primary and priority 0 to standby nodes. Because priority-0 members cannot become primary, the planned stepdown failed: neither standby was an eligible replacement. The test therefore never reached its post-election write-blocking checks.
As part of this ti
Fixed Versions
9.1.0-rc09.1.0-rc1026
SERVER-139144ClosedFixed
Delete featureFlagStreamingGroupEligibilityCounter
{{featureFlagStreamingGroupEligibilityCounter}} was gating logic that annotates plans with SBE $group with whether they would be eligible to use {{StreamingAggStage}}. A separate {{featureFlagStreamingGroupSbe}} enables actually using streaming group in the plan.
{{featureFlagStreamingGroupEligibilityCounter}} was added as default-enabled (in order to have a fallback mechanism for disabling the annotation), but we're deleting it now to reduce complexity and avoid handling cases like {{featureFl
Fixed Versions
9.1.0-rc09.1.0-rc1026
SERVER-138199Open
Track CBR sample memory in peakTrackedMemBytes and serverStatus
Each query that runs through the sampling estimator currently holds a sample in memory. Currently, the memory usage of that sample is already computed in [SamplingEstimatorImpl::getSamplingMetadata()|https://github.com/10gen/mongo/blob/2029eca66f86a397d5e7322e84732018705d7838/src/mongo/db/query/compiler/ce/sampling/sampling_estimator_impl.cpp#L603-L607] but this is only exposed in explain:
* It is not charged to the operation's memory tracker, so it does not show up in {{peakTrackedMemBytes}}.
SERVER-138198Open
Track memory of buffered multiplanner trial results in peakTrackedMemBytes and serverStatus
During the classic multiplanner trial period, each candidate plan stores the results it produces in [BaseCandidatePlan::results|https://github.com/10gen/mongo/blob/2029eca66f86a397d5e7322e84732018705d7838/src/mongo/db/query/plan_ranker.h#L204]. These buffered results are added by the {{MultiPlanStage}} and is not measured or tracked anywhere:
* It is not added to the operation's memory tracker, so it does not show up in {{peakTrackedMemBytes}} (slow query log, profiler, $currentOp, query stats)
SERVER-138725Needs Scheduling
Lazily evaluate expressions for logging in CBR
found that we unconditionally log MatchExpressions [here|https://github.com/mongodb/mongo/blob/d48ca0a141adc807e22d47ee8cfd9e3d0ecb2bbb/src/mongo/db/query/compiler/optimizer/cost_based_ranker/ce_cache.h#L76]. We should do this lazily and respect the EnableLogging logging level:
bq. If CBR is invoked for large index bounds or match expressions (for example a large $in list), the cost of toString() calls could add up. I had it explore a bit more and for the $in case it found an example where plan
SERVER-135125ClosedFixed
Add relevant AsioTransportLayer stats to the HandoffTransportLayer
[This document|https://docs.google.com/document/d/1Bpr0pmvvgYpwqaBI3hR-SNejo5rk9A_nhchJ-H8om-g/edit?tab=t.0] describes some stats that we should be tracking in dashboards, but some of them are only defined on the AsioTransportLayer and wouldn't be available for clusters using the HandoffTransportLayer. We should ensure that these stats are available on both transport layers. Ideally, we would turn these into otel metrics but the only requirement here is to ensure that we can access the metrics i
Fixed Versions
9.1.0-rc09.1.0-rc1026
SERVER-137477ClosedFixed
Separate hash lookup teardown time from interrupt delinquency accounting
h2. Problem
Destroying a large in-memory SBE hash lookup table produces interrupt delinquency during query cleanup. This happens without spilling. Cancellation cannot avoid required destruction, so this time should be distinguished from unchecked interruptible execution while retaining visibility into time needed to stop a query.
h2. Reproduction
Validated on master 59767b3c795 on ARM with real data, no failpoints or injected delays.
# Insert 60,000 foreign documents with unique join keys and a
Fixed Versions
9.1.0-rc09.1.0-rc1026
SERVER-137528Backlog
Conditionally pushdown $match past $group in $lookup
The pipeline optimiser applies $match pushdown in subpipelines before selecting the $lookup cache boundary. The $lookup cache (DocumentSourceSequentialDocumentCache) caches the longest initial prefix that meets its requirements: stages must support dependency tracking, must not reference variables defined in the lookup scope, and must not require randomness (with the $search and $vectorSearch exceptions to the dependency-tracking check). A correlated $match ends the cacheable prefix, but earlier
SERVER-139157Backlog
Fix bounded NDV estimation to use matching samples
The current seek estimator [passes|https://github.com/mongodb/mongo/blob/287f53d383e3750fe35c4d9e0af850625d756917/src/mongo/db/query/compiler/ce/sampling/sampling_estimator_impl.cpp#L909] to Newton-Raphson the sampleNDV satisfying the given bounds but the total sample size as the population count, including those not satisfying the given bounds, confusing the two populations.
The sketch of a fix improved plan quality on the plan stability tests and synthetic benchmarks.
Came up while I was
SERVER-139194Backlog
Make sure the fields in wildcardProjection are included in the samplingCE sample
SERVER-134637 introduced support for costing hashed/collated/wildcard indices. As "generic" index scans on wildcard indices essentially scan keys for all the fields indexed under the wildcard, they all must be included in the sample to get realistic estimates.
SERVER-139178ClosedFixed
Add more golden testing for SBE local access plans followed by LU
Add more golden tests to show stage builder behavior when we have different local access paths + LU
Fixed Versions
9.1.0-rc09.1.0-rc1026
SERVER-138746Backlog
Multikey NDV estimate fast path ignores bounds
The [current|https://github.com/10gen/mongo/blob/dcf40f818e329ae5e2a9a34654345eac74bb67d3/src/mongo/db/query/compiler/ce/sampling/sampling_estimator_impl.cpp#L957] logic reads:
ie. if all the matching keys in the sample are unique, we avoid Newton-Raphson, instead returning the estimated total number of index keys.
Instead we should return the estimated number of _matching_ index keys.
Noticed while working on SERVER-134637.
SERVER-139254Backlog
Elaborate on UnsupportedCbrNode
We currently return it for many cases, muddying observability.
It should carry eg. the name of the unsupported node / why it was not supported etc.
SERVER-139093Backlog
Support persisting NDV for collated/non-btree indexes
SERVER-134637 added support for hashed/wildcard/collated indices to CBR but explicitly disabled these new index types from using the persisted stats to estimate the NDV.
They cannot naively use the persisted NDV stats because the index bounds for index scans on these indexes are transformed (hashed/collated/transformed to the wildcard format etc.), which the current persisted NDV stats do not replicate.
SERVER-138723ClosedWon't Fix
Gracefully handle CE failing due to stale persisted samples
This can happen due to eg. a document with parallel arrays (wrt. an existing multikey index) existing in the persisted sample.
We currently fail the query in this case, but can do better (eg. fall back to MP, retry with on-the-fly sampling, trigger a re-sample etc.).
Repro:
This fails with {{MongoServerError[Location10061118]: Parallel arrays are not supported}}
Or this one:
Which fails with {{MongoServerError[QueryPlanKilled]: query plan killed :: non-array path became multikey w
SERVER-138967Backlog
queryStats CBR nDocsSampled inaccurate for $lookup etc.
Currently the counter is not [additive|https://github.com/mongodb/mongo/blob/d48ca0a141adc807e22d47ee8cfd9e3d0ecb2bbb/src/mongo/db/query/plan_ranking/cbr_plan_ranking.cpp#L164-L165] so queries which plan more than once (eg. $lookup) under-report.
Found by Claude Opus 5.5.
SERVER-138961Backlog
queryStats CBR nDocsSampled inaccurate for small collections
SERVER-130972 changes the semantics of SamplingEstimator::getSampleSize and now it always returns the requested sample size, even if the collection was too small to reach that size, and this ends up at $queryStats.