Patch Releases
9.0.2 - Sept 28, 2026
Issues fixed:
SERVER-134970 Disable featureFlagChangeStreamOptimizedUpdateLookup
SERVER-135099 Disable IFR flag featureFlagChangeStreamReaderV2
SERVER-134533 Starting shard draining during movePrimary can cause metadata inconsistencies
SERVER-134808 Invalid UTF-8 Database names are not handled well
9.0.1 - Sept 28, 2026
This release contains important security and reliability improvements.
Important
MongoDB 9.0.1 contains a fix for:
For the latest information about MongoDB security updates, see MongoDB Security Bulletins.
Issues fixed:
SERVER-134063 Shred collection validator constants during parsing
9.0.0 - Sept 28, 2026
General Changes
Change Stream Pre-Image Metrics
Starting in MongoDB 9.0, the changeStreamPreImages.purgingJob.docsDeleted and changeStreamPreImages.purgingJob.bytesDeleted serverStatus metrics may report estimates rather than exact values. These estimates occur when size and count information is not available for the config.system.preimages collection. For details, see changeStreamPreImages.
MongoDB 9.0 also adds a new changeStreamPreImages.markerCreation serverStatus document. This document reports metrics related to the pre-image sampling passes that build the initial truncation information used to remove pre-images. For details, see changeStreamPreImages.
Multi-Document Transaction Limit
Starting in MongoDB 9.0, the server limits the number of concurrently open multi-document transactions for external clients. When the number of open transactions reaches the limit set by the maxConcurrentMultiDocumentTransactions parameter (default 10000), the server rejects new multi-document transactions and returns a TooManyOpenTransactions error. To learn more, see maxConcurrentMultiDocumentTransactions.
Per-Operation Memory Limit
Starting in MongoDB 9.0, MongoDB limits the total amount of memory that a single query operation can use. By default, the limit is 1 gigabyte or 20% of the memory available to the server process, whichever is greater. Operations that exceed the limit fail with ExceededMemoryLimit or QueryExceededMemoryLimitNoDiskUseAllowed. In earlier versions, an operation could use an unbounded amount of memory.
The 100 megabyte per-stage memory limit and the spill-to-disk behavior of individual stages are unchanged. To learn more, see Per-Operation Memory Limit.
Server-side JavaScript
Starting in MongoDB 9.0, the server-side JavaScript functions ($accumulator, $function, and $where) are no longer deprecated. MongoDB 9.0 re-enables these functions using a WebAssembly (WASM)-based JavaScript engine, which improves security through stronger sandboxing and isolation than prior versions. These functions were previously deprecated in MongoDB 8.0.
Server-side JavaScript is not available on the ppc64le architecture. To learn more, see Server-side JavaScript.
Server Status
MongoDB 9.0 adds the following serverStatus metrics:
Renamed Server Status Metrics
MongoDB 9.0 renames the shardingStatistics.databaseVersionUpdateCounters document, introduced in MongoDB 8.3, to shardingStatistics.databaseShardingMetadataStatistics. MongoDB 9.0 also replaces the fields of the renamed document with a new set of metrics.
MongoDB 9.0 renames the metrics.changeStreams.showExpandedEvents metric to metrics.changeStreams.option.showExpandedEvents. If you monitor the metric by name, update your monitoring to use the new name.
New Parameters
sessionCatalogPartitions Parameter
MongoDB 9.0.1 adds the sessionCatalogPartitions parameter, which specifies the number of partitions in the session catalog. Partitioning the session catalog reduces lock contention when there are a large number of sessions.
Sharding
checkMetadataConsistency Inconsistency Types
MongoDB 9.0 adds the following checkMetadataConsistency inconsistency types:
MongoDB 9.0 removes the ShardCatalogCacheCollectionMetadataMismatch inconsistency type.
checkMetadataConsistency Chunk Check Threshold
MongoDB 9.0 adds a performStrictChunkChecksIfBelowThreshold option to the checkMetadataConsistency command. Use this option to set a chunk-count threshold for a shard's chunk comparison. Below the threshold, the command performs a full comparison. At or above it, the command performs a lighter, count-only comparison. For details, see Chunk Check Threshold.
Cursor Namespace in Command Responses
Starting in MongoDB 9.0, when you run a find, aggregate, or listIndexes command on a time series collection, the cursor.ns field in the response returns the user-facing namespace you originally targeted. In previous versions, the server could return the internal namespace.
BSON Validation
MongoDB 9.0 deprecates the net.wireObjectCheck configuration option and its corresponding --objcheck and --noobjcheckand CLI arguments. Starting in 9.0, MongoDB validates all BSON objects that the server ingests by default. If the server receives invalid BSON data, MongoDB returns an error.
Document Validation
MongoDB 9.0 introduces a new schema validation level of constraint. With the constraint validation level, MongoDB applies the validation rules to all document inserts and updates, and guarantees that every document in the collection satisfies the rules. For details, see Specify constraint Validation.
Sharding Methods
MongoDB 9.0 introduces the following mongosh methods:
Time Series
Note
When you upgrade to 9.0, clusters with more than 5,000 time series collections in a single database may take longer to update and face additional write latency spikes. To reduce this impact, drop or delete any unnecessary time series collections.
Data Storage
Starting in 9.0, MongoDB stores time series collections as a single namespace that contains time series data compressed into buckets. Time series collections are no longer writable non-materialized views.
renameCollection
Starting in MongoDB 9.0, you can rename time series collections with renameCollection.
Aggregation
$queryStats Output
MongoDB 9.0 updates the $queryStats output to streamline metrics organization. This update includes the following new output fields:
Field | Description |
|---|---|
| A document that contains metrics relevant to the cursor and batching protocol |
| A document that contains metrics relevant to query execution |
| A document that contains metrics relevant to the query planner |
| A document that contains metrics relevant to operation writes |
For more information on the new output structure, see $queryStats Output.
Command Support
Starting in 9.0, MongoDB collections and reports query statistics for update, insert, and delete commands. For details, see update Command Query Shape, insert Command Query Shape, and delete Command Query Shape.
Query Stats Enabled by Default
Starting in MongoDB 9.0, $queryStats collects stats by default for both read and write operations. MongoDB collects stats for a sample of operations rather than for every operation. MongoDB samples read operations at the rate set by the internalQueryStatsSampleRate parameter and write operations at the rate set by the internalQueryStatsWriteCmdSampleRate parameter. Both parameters default to 0.01, which samples 1% of operations.
Because $queryStats reports only the operations that MongoDB samples, its output represents a subset of the operations run against your deployment.
Query Language
Query Settings as a Command Field
Starting in MongoDB 9.0, you can pass a querySettings document directly to the following commands:
These settings apply only to that execution of the command. MongoDB doesn't store the settings on the cluster and doesn't apply them to other queries with the same query shape.
In earlier versions, you could only set query settings with the setQuerySettings command, which stores the settings on the cluster and applies them to every query with the matching query shape.
If a query shape has stored cluster query settings, MongoDB combines those settings with the settings that you pass in the command. If both specify the same field, the stored cluster setting takes precedence.
Query Knobs
New in version 9.0.
Starting in MongoDB 9.0, you can override internal server parameters for a single query shape with the queryKnobs query setting. The queryKnobs setting requires feature compatibility version (FCV) 9.0 or later.
For details, see Query Knobs.
Per-Shape maxTimeMS
New in version 9.0.
Starting in MongoDB 9.0, you can set a maxTimeMS time limit for a single query shape with the setQuerySettings command. The maxTimeMS query setting requires feature compatibility version (FCV) 9.0 or later.
For details, see Command Fields.
Null Comparisons on Dotted Paths
Starting in MongoDB 9.0, a dotted path that does not resolve to a non-null value evaluates as null. The new behavior applies when a field in the path holds an empty array, an array of scalar values, or an array that contains a nested array. Comparisons to null that use the $eq, $ne, $in, $nin, $gte, and $lte operators reflect the new semantics. Equality matching in the $lookup stage also reflects the new semantics. Queries that compare a dotted path to null can return different results after you upgrade. For details, see Compatibility Changes in MongoDB 9.0.
Security
Queryable Encryption Prefix, Suffix, and Substring Query General Availability
MongoDB 9.0 marks the GA of prefix, suffix, and substring queries on encrypted string fields in Queryable Encryption enabled collections. For details, see enable substring queries and Supported Aggregation Expressions.
To use prefix, suffix, or substring queries with mongosh, you must separately download the Automatic Encryption Shared Library 9.0 or later, then specify the library path to mongosh using the --cryptSharedLibPath option.
useInternalAuthzForX509 Parameter
MongoDB 9.0 adds the useInternalAuthzForX509 parameter. When set to true, clients that authenticate using MONGODB-X509 use internal authorization, even when LDAP authorization is configured. For details, see useInternalAuthzForX509.
usersInfo authenticatedMechanism Field
MongoDB 9.0 adds the authenticatedMechanism field to the usersInfo command. This optional string field specifies an authentication mechanism to determine which authorization backend usersInfo queries when looking up user authorization information. For details, see usersInfo.
mongocryptd Deprecated
Starting in MongoDB 9.0, mongocryptd is deprecated. Use the Automatic Encryption Shared Library instead. The Automatic Encryption Shared Library replaces mongocryptd and does not require you to start a separate process. For details, see Install and Configure a CSFLE Query Analysis Component and Install and Configure a Query Analysis Component.
Audit Log Improvements
MongoDB 9.0 adds the directRemote field to audit messages in the mongo schema and the direct_endpoint field to audit messages in the OCSF schema. These fields record the literal TCP peer for a session, independent of any client address that a PROXY protocol header asserts. For details, see mongo Schema Audit Messages and OCSF Schema Audit Messages.
Replication
New replSetGetStatus Metrics for Phase Tracking
Starting in MongoDB 9.0, the following metrics are available when using the replSetGetStatus command during a logical initial sync:
Each document in initialSyncAttempts also reports the phase, nodeUptimeSecs, and phaseDurations for that attempt. For details, see replSetGetStatus.initialSyncStatus.initialSyncAttempts.
Diagnostics
Improved Diagnostics for Unindexable Documents
Starting in MongoDB 9.0, key-extraction failures on 2dsphere indexes produce structured diagnostics that make unindexable documents easier to identify:
Failed geo inserts and index builds now include a
writeErrors[].errInfodocument that contains thefailingPath,underlyingCode,underlyingReason, andfailingElementfields. Existing field names are unchanged, but the error reason string is now bounded to 256 characters.The
validate.errorsoutput for geo key-extraction failures now emits a bounded, self-contained message and writes full per-document detail to themongodlog. Identical failures on the same index and path are deduplicated into a single message, so to map a failure back to specific documents, consult the log instead of thevalidateoutput. Full per-document detail is logged only when log redaction is disabled. For details, seevalidate.
Change Stream Metrics
Starting in MongoDB 9.0, serverStatus reports the following change stream cursor metrics on each mongod and mongos process:
metrics.changeStreams.cursor.open.total, the number of change stream cursors currently open in the process, including idle and pinned cursors.metrics.changeStreams.cursor.open.pinned, the number of open change stream cursors that an operation is actively using.metrics.changeStreams.cursor.totalOpened, the cumulative number of change stream cursors opened in the process, including cursors that have since closed and cursors created when a change stream resumes.metrics.changeStreams.cursor.lifespan, the average lifespan, in microseconds, and the total number of the change stream cursors that have closed in the process.
The currentOp command and the $currentOp stage also report currentOp.cursor.changeStreams.optime, the change stream cursor's current position in the oplog. To learn more about change streams, see MongoDB Change Streams.
Known Issues
This section describes known issues in MongoDB 9.0 and their resolution status.
In Version | Issue | Status |
|---|---|---|
9.0.0, 9.0.1, 9.02 | SERVER-133518: A shard can hang during step-up when a chunk operation that was interrupted during a prior step-down blocks recovery of a persisted migration recipient. If the hang occurs, the shard cannot become primary, and writes and reads using primary read preference become unavailable on the shard. Secondaries can continue serving reads. To recover, restart or force-terminate the hung node so another secondary can become a writable primary. | Fixed in MongoDB 9.0.3. |