This page describes changes and new features introduced in MongoDB 7.0.
MongoDB 7.0 is a Major Release, which means that it is supported for both MongoDB Atlas and on-premises deployments. MongoDB 7.0 includes changes introduced in MongoDB Rapid Releases 6.1, 6.2, and 6.3. This page describes changes introduced in those Rapid Releases and MongoDB 7.0.
To learn more about the differences between Major and Rapid releases, see MongoDB Versioning.
Warning
Past Release Limitations
The Critical Advisories below affect some prior MongoDB versions. If your deployment depends on features impacted by a Critical Advisory, upgrade to the latest available patch release.
Issue | Affected Versions |
---|---|
7.0.0 - 7.0.15 | |
7.0.0 - 7.0.2 | |
7.0.0 - 7.0.2 | |
7.0.0 - 7.0.5 | |
7.0.0 - 7.0.5 | |
7.0.0 - 7.0.6 | |
7.0.0 - 7.0.7 | |
7.0.0 - 7.0.15 |
Patch Releases
7.0.25 - Oct 2, 2025
This release contains security or reliability improvements. These release notes will be updated when more information is available.
7.0.24 - Sep 10, 2025
Issues fixed:
SERVER-103505: Handle metadata errors in WiredTigerUtil::setTableLogging
SERVER-103741: Add profile collection metrics
SERVER-104771: [v7.0] Initial sync fails when the source has TTL indexes on a capped collection
WT-14391: Check eviction server is running before opening HS
WT-14653: Add logs/stats to reconciliation for tracking HS updates
7.0.23 - Aug 13, 2025
Issues fixed:
SERVER-81797: Make our own portable implementation of atomic
notify()
andwait()
with timeout supportSERVER-86656: Create a reader-optimized reader-writer mutex
SERVER-95324: Disable chunkMigrationConcurrency
SERVER-101581: Check socket state before accepting connection in ASIO
SERVER-103934: FCBIS should be able to call KVEngine::cleanShutdown without leaking memory
7.0.22 - Jul 18, 2025
Issues fixed:
SERVER-95523: upsert does not handle DuplicateKey retry correctly
SERVER-95524: Avoid retrying on duplicate key error for upserts in multidocument transactions
SERVER-96197: ExpressionContext's _resolvedNamespaces can't distinguish between collections with the same name in different dbs
SERVER-98386: Shard does not correctly check the ShardVersion received for timeseries collections
7.0.21 - Jun 04, 2025
Issues fixed:
SERVER-92806: Plan cache entry ignores index collation with $elemMatch
SERVER-95672: Indexes on array fields that contain subarrays does not include some results
SERVER-97044: Fix an issue where change streams might incorrectly output a "drop" event during resharding or unsharding of a collection that is or was using zone sharding
WT-12012: Restore original verbose levels if gen_drain becomes unstuck after increasing verbose levels
WT-13216: Assess the use of cache eviction check in compact
7.0.20 - Apr 29, 2025
Important
Fix for incorrect handling of incomplete data may prevent mongos from accepting new connections
Due to CVE-2025-6714, in MongoDB 7.0 prior to 7.0.20, MongoDB Server's mongos
component can become unresponsive to new connections due to incorrect handling of incomplete data. This issue affects sharded MongoDB clusters that are configured with load balancer support for mongos
using HAProxy
on specified ports.
This issue affects the following MongoDB Server versions:
8.0.0 - 8.0.8
7.0.0 - 7.0.19
6.0.0 - 6.0.22
CVSS Score: 7.5
CWE: CWE-834 Excessive Iteration AND CWE-400 Uncontrolled Resource Consumption
Issues fixed:
SERVER-93120: FTDC collection blocked on locked backupCursor state read
SERVER-106753: Incorrect handling of incomplete data may prevent
mongos
from accepting new connections
7.0.19 - Apr 14, 2025
Important
MongoDB Server may be susceptible to privilege escalation due to $mergeCursors stage
Due to CVE-2025-6713, in MongoDB 7.0 prior to 7.0.19, an unauthorized user may leverage a specially crafted aggregation pipeline to access data without proper authorization due to improper handling of the $mergeCursors
stage in MongoDB Server. This may lead to access to data without further authorization.
This issue affects the following MongoDB Server versions:
8.0.0 - 8.0.6
7.0.0 - 7.0.18
6.0.0 - 6.0.21
CVSS Score: 7.7
CWE: CWE-285: Improper Authorization
Issues fixed:
SERVER-106752 MongoDB Server may be susceptible to privilege escalation due to
$mergeCursors
stage
7.0.18 - Mar 19, 2025
Issues fixed:
SERVER-82037 Memory used by sorter spills can grow without bound
SERVER-90689 Change THP startup warning checks to also look at process level settings before emitting warning
SERVER-95452 Prevent CollectionRoutingInfoTargeter from iterating all chunk ranges during update and delete
SERVER-98720 Add missing redact() calls to "Plan executor error" warning logs
SERVER-100901 Relax user digest invariant to tassert in ShardingTaskExecutor
7.0.17 - Feb 21, 2025
Important
Pre-Authentication Denial of Service Vulnerability in MongoDB Server's OIDC Authentication
Due to CVE-2025-6709, in MongoDB 7.0 prior to 7.0.17, MongoDB Server is susceptible to a denial of service vulnerability due to improper handling of specific date values in JSON input when using OIDC authentication. This can be reproduced using the mongo shell to send a malicious JSON payload leading to an invariant failure and server crash.
This issue affects the following MongoDB Server versions:
8.0.0 - 8.0.4
7.0.0 - 7.0.16
The same issue affects MongoDB Server v6.0, but an attacker can only induce denial of service after authenticating. This issue affects the following MongoDB Server versions:
6.0.0 - 6.0.20
CVSS Score: 7.5
CWE: CWE-20: Improper Input Validation
Important
Pre-authentication Denial of Service Stack Overflow Vulnerability in JSON Parsing via Excessive Recursion in MongoDB
Due to CVE-2025-6710, in MongoDB 7.0 prior to 7.0.17, MongoDB Server may be susceptible to stack overflow due to JSON parsing mechanism, where specifically crafted JSON inputs may induce unwarranted levels of recursion, resulting in excessive stack space consumption. Such inputs can lead to a stack overflow that causes the server to crash which could occur pre-authorisation.
This issue affects the following MongoDB Server versions:
8.0.0 - 8.0.4
7.0.0 - 7.0.16
The same issue affects MongoDB Server v6.0, but an attacker can only induce denial of service after authenticating. This issue affects the following MongoDB Server versions:
6.0.0 - 6.0.20
CVSS Score: 7.5
CWE: CWE-674: Uncontrolled Recursion
Issues fixed:
SERVER-73641 Timeseries filtering can miss extended-range events when sharded
SERVER-76883 Reduce chattiness of "Role does not exist" logs for externally sourced users
SERVER-85627 Log information of interrupted thead in stepdown killOp
SERVER-89614 $out doesn't clean up correctly between rename and dropping temp collection
SERVER-106748 Pre-auth denial of service when accepting OIDC authentication
SERVER-106749 Pre-authentication Denial of Service Stack Overflow Vulnerability in JSON Parsing via Excessive Recursion in MongoDB
7.0.16 - Dec 20, 2024
Issues Fixed:
SERVER-67816 Time-series bucket rounding for pre-1970 dates behaves unexpectedly
SERVER-90672 Investigate potential bug in time-series insert path that allows for multiple buckets to have the same OIDs, across stripes
SERVER-90893 listDatabases inconsistent with concurrent DDL operations
SERVER-94559 Time-series measurement deletes update the minTime of a bucket
SERVER-95067 Time-series inserts can generate multiple batches referencing the same bucket
7.0.15 - Oct 24, 2024
Important
Improper neutralization of null bytes may lead to buffer over-reads in MongoDB Server
In MongoDB 7.0 prior to 7.0.15, an authorized user may trigger crashes or receive the contents of buffer over-reads of Server memory by issuing specially crafted requests that construct malformed BSON in the MongoDB Server.
This issue affects MongoDB Server versions:
5.0.0 - 5.0.29
6.0.0 - 6.0.18
7.0.0 - 7.0.14
8.0.0 - 8.0.1
SERVER-96419 Improper neutralization of null bytes may lead to buffer over-reads in MongoDB Server
7.0.14 - Aug 26, 2024
Issues Fixed:
SERVER-82814 Support internal expr comparison operators when determining clustered collection scan bounds
SERVER-85892 $merge with pipeline after $documents returns error
SERVER-91195 Provide a generic backportable solution not to miss top-level timeseries collection options
SERVER-91625 Enable indexed plans for expressions with $$NOW, $$CLUSTER_TIME and $$USER_ROLES
WT-12643 Fix Eviction Server walk logic so that it's able to evict all pages
7.0.12 - Jun 28, 2024
Important
Fix for CSFLE and Queryable Encryption self-lookup may send values in subpipelines as plaintext instead of ciphertext
Due to CVE-2024-8013, in MongoDB 7.0 prior to 7.0.12, a bug in query analysis of certain complex self-referential $lookup
subpipelines may result in literal values in expressions for encrypted fields being sent to the server malformed.
Should this occur, no documents are returned or written. This issue affects the mongocryptd
binary and mongo_crypt_v1
shared library in the following MongoDB Server versions:
7.3.0 - 7.3.3
7.0.0 - 7.0.11
6.0.0 - 6.0.16
5.0.0 - 5.0.28
CVSS Score: 2.2
CWE: CWE-319: Cleartext Transmission of Sensitive Information
Issues Fixed:
SERVER-96254 CSFLE and Queryable Encryption self-lookup may fail to encrypt values in subpipelines
SERVER-64574 Upgrade MozJS/Spidermonkey to the latest ESR
SERVER-86674 Primary catch-up may believe it is caught up when it is not
SERVER-90485 $sort does not work as expected when used in conjunction with includeArrayIndex
SERVER-91362 Performance: Do not copy JS "scope" object if a cached JsExecution exists
WT-12736 Mark the page clean after re-instantiating the page with prepared updates
7.0.11 - May 23, 2024
Issues Fixed:
SERVER-85279 Don't run the FTDC collection stats collector on arbiters
SERVER-89495 Disable test parameters even when no setParameters are specified
SERVER-89625 Handle directoryPerDb and wiredTigerDirectoryForIndexes correctly when reporting namespaces and UUIDs during a backup
SERVER-90288 Bitwise query operators should interpret lowest addressable byte in BinData as least significant byte
WT-12609 Improve checkpoint cleanup and page eviction logic
7.0.9 - Apr 26, 2024
Issues fixed:
SERVER-79637 Incorrect query results in $lookup with TS foreign collection using a correlated predicate
SERVER-82349 Mongo 7 crashes on applyOps index delete/drops without a collection UUID
SERVER-86407 Validation does not produce complete results when it should
SERVER-88173 BinData bit comparisons give wrong results in many cases
WT-10807 Skip in-memory deleted pages as part of the tree walk
7.0.8 - Apr 3, 2024
Issues fixed:
SERVER-78556 Return default of internalInsertMaxBatchSize to 64
SERVER-79575 Fix numa node counting
SERVER-86583 Non-transactional snapshot read on unsharded collection may execute with mismatched sharding metadata
SERVER-87666 Query shape for $documents is unique on each execution
SERVER-88360 Remove "Sharding catalog and local catalog collection uuid do not match" tripwire assertion
7.0.7 - Mar 18, 2024
Issues fixed:
SERVER-84368 CreateIndex fails with StaleConfig if run from a stale mongos against a sharded non-empty collection
SERVER-84628 Startup warning in mongos for Read/Write Concern
SERVER-85459 [v7.0] bucketRoundingSeconds param is accepted by nodes on FCV 6.0, binary 7.0
SERVER-85869 Exhaustive find on config shard can return stale data
SERVER-87061 Sharded multi-document transactions can observe partial effects of concurrent reshard operation
7.0.6 - Feb 28, 2024
Important
Fix for MongoDB Server may allow successful untrusted connection
Due to CVE-2024-1351, in MongoDB 7.0 prior to 7.0.6, under certain configurations of --tlsCAFile
and CAFile
, MongoDB Server may skip peer certificate validation which may result in untrusted connections to succeed.
This may effectively reduce the security guarantees provided by TLS and open connections that should have been closed due to failing certificate validation. This issue affects the following MongoDB Server versions:
7.0.0 - 7.0.5
6.0.0 - 6.0.13
5.0.0 - 5.0.24
4.4.0 - 4.4.28
CVSS Score: 8.8
CWE: CWE-295: Improper Certificate Validation
Issues fixed:
SERVER-72703 Downgrade $out's db lock to MODE_IX
SERVER-82353 Multi-document transactions can miss documents when movePrimary runs concurrently
SERVER-84338 Top level $or queries may lead to invalid SBE plan cache entry which returns wrong results
SERVER-84723 Sharded multi-document transactions can observe partial effects of concurrent DDL operations
WT-11062 Safe free the ref addr to allow concurrent access
7.0.5 - Jan 5, 2024
Issues fixed:
SERVER-33494 WT SizeStorer never deletes old entries
SERVER-80363 server default writeConcern is not honored when wtimeout is set
SERVER-83091 $or query can trigger an infinite loop during plan enumeration
SERVER-83830 On Enterprise build creating a collection in a replica set with the storageEngine.inMemory option breaks secondaries
WT-7929 Investigate a solution to avoid FTDC stalls during checkpoint
7.0.4 - Nov 27, 2023
Issues fixed:
SERVER-67962 Applying config.image_collection deletes needs better concurrency control
SERVER-69244 $merge fails when session default read concern has been set to "majority"
SERVER-79975 [Classic] Optimize large group keys
SERVER-81133 Speedup logic to persist routing table cache
SERVER-82446 $densify use case can result in documents outside of range
7.0.3 - Nov 9, 2023
Issues fixed:
SERVER-77506 Sharded multi-document transactions can mismatch data and ShardVersion
SERVER-79088 Improve SBE multi-planner performance for query which returns zero results
SERVER-81106 Recipient shard doesn't wait for the collection version to be locally persisted before starting the cloning phase
SERVER-81966 Avoid modification of previous ChunkMap instances during refresh
WT-11564 Fix RTS to read the newest transaction value only when it exists in the checkpoint
7.0.2 - Sep 29, 2023
Issues fixed:
SERVER-74954 Incorrect result when contained $or rewrites $elemMatch extra condition
SERVER-79771 Make Resharding Operation Resilient to NetworkInterfaceExceededTimeLimit
SERVER-79912 CheckReplDBHash reports failure with system.buckets collections due to invalid BSON
SERVER-79982 Batched catalog writers can run concurrently with HistoricalCatalogIdTracker::cleanup() and lead to incorrect PIT find results
SERVER-80488 Avoid traversing routing table in balancer split chunk policy
7.0.1 - Sep 5, 2023
Issues fixed:
SERVER-71627 Refreshing cached collection route info severely blocks all client requests for a cluster with 1 million chunks
SERVER-77183 $project followed by $group sometimes gives incorrect results
SERVER-80256 QueryPlannerAnalysis::explodeForSort should not assume that index scans produce disjoint results
7.0.0 - Aug 15, 2023
The rest of this page describes changes and new features introduced in MongoDB 7.0.
Atlas Search Index Management
Starting in MongoDB 7.0, you can manage MongoDB Search indexes with mongosh
methods and database commands. MongoDB Search index commands are only available for deployments hosted on MongoDB Atlas, and require an Atlas cluster tier of at least M10.
To manage MongoDB Search indexes, use the following commands:
mongosh Methods
Name | Description |
---|---|
Creates an MongoDB Search index on a specified collection or view. | |
Deletes an existing MongoDB Search index. | |
Returns information about existing MongoDB Search indexes on a specified collection or view. | |
Updates an existing MongoDB Search index. |
Database Commands
Name | Description |
---|---|
Creates one or more MongoDB Search indexes on a specified collection or view. | |
Deletes an existing MongoDB Search index. | |
Updates an existing MongoDB Search index. |
Aggregation Stages
Name | Description |
---|---|
Lists sampled queries for all collections or a specific collection. | |
Returns information about existing MongoDB Search indexes on a specified collection or view. |
General Changes
OIDC Access Token Authentication Behavior
Starting in MongoDB 7.0, only one audience
oidcIdentityProviders field can be specified for OIDC access tokens. audience
fields with empty arrays or arrays of multiple strings are invalid.
For details, see oidcIdentityProviders Fields.
Drop a Hashed Shard Key Index
Starting in MongoDB 7.0.3 (and 6.0.12 and 5.0.22), you can drop the index for a hashed shard key.
This can speed up data insertion for collections sharded with a hashed shard key.
For details, see Drop a Hashed Shard Key Index.
Cache Refresh Time Fields
Starting in MongoDB 7.0, log messages for slow queries includes a new cache refresh time field.
Concurrent Storage Engine Transactions (Read and Write Tickets)
Starting in version 7.0, MongoDB uses a default algorithm to dynamically adjust the maximum number of concurrent storage engine transactions (including both read and write tickets) to optimize database throughput during overload.
The following table summarizes how to identify overload scenarios for MongoDB post-7.0 and for earlier releases:
Version | Diagnosing Overload Scenarios |
---|---|
7.0 and later | A large number of queued operations that persists for a prolonged period of time likely indicates an overload. A concurrent storage engine transaction (ticket) availability of 0 for a prolonged period of time does not indicate an overload. |
6.0 and earlier | A large number of queued operations that persists for a prolonged period of time likely indicates an overload. A concurrent storage engine transaction (ticket) availibility of 0 for a prolonged period of time likely indicates an overload. |
To learn more, see:
wiredTiger.concurrentTransactions
Renamed
queues.execution
in v8.0.
currentOp
Metrics
Starting in MongoDB 7.0, the currentOp
command and the db.currentOp()
method include these new fields:
$currentOp
(aggregation) Metrics
Starting in MongoDB 7.0, the currentOp aggregation stage includes these new fields:
Compound Wildcard Indexes
Starting in MongoDB 7.0, you can create compound wildcard indexes. A compound wildcard index has one wildcard term and one or more additional index terms.
Use compound wildcard indexes to support queries on known patterns and to limit the total number of indexes in a collection.
Large Change Stream Events
Starting in MongoDB 7.0, if you have change stream events larger than 16 MB, you can use the new $changeStreamSplitLargeEvent
stage to split the events into smaller fragments.
The following new metrics report information about large change stream events:
serverStatus Output Change
serverStatus
includes the following new fields in its output:
Slot-Based Query Execution Engine
Starting in MongoDB 7.0, the slot-based query execution engine improves performance for a wider range of find and aggregation queries.
Slow query log messages now include a queryFramework
field that indicates which query engine completed the query:
queryFramework: "classic"
indicates that the classic engine completed the query.queryFramework: "sbe"
indicates that the slot-based query execution engine completed the query.
User Roles System Variable
Starting in MongoDB 7.0, you can use the new USER_ROLES
system variable to return the roles of the current user.
For use cases that include USER_ROLES
, see the find, aggregation, view, updateOne, updateMany, and findAndModify examples.
New Sharding Statistics for Chunk Migrations
Available starting in MongoDB 7.1 (and 7.0, 6.3.2, 6.0.6, and 5.0.18).
MongoDB includes the following new sharding statistics for chunk migrations:
New Slow Query Log Message
The totalOplogSlotDurationMicros
in the slow query log message shows the time between a write operation getting a commit timestamp to commit the storage engine writes and actually committing. mongod
supports parallel writes. However, it commits write operations with commit timestamps in any order.
To learn more, see Logging Slow Operations.
New Parameters
analyzeShardKey-related Parameters
MongoDB 7.0 adds the following parameters related to the analyzeShardKey
command:
autoMergerIntervalSecs Parameter
MongoDB 7.0 adds the autoMergerIntervalSecs
parameter which, when AutoMerger is enabled, specifies the amount of time between automerging rounds, in seconds. autoMergerIntervalSecs
can only be set on config servers of sharded clusters.
autoMergerThrottlingMS Parameter
MongoDB 7.0 adds the autoMergerThrottlingMS
which, when AutoMerger is enabled, specifies the minimum amount time between merges initiated by the AutoMerger on the same collection, in milliseconds. autoMergerThrottlingMS
can only be set on config servers of sharded clusters.
balancerMigrationsThrottlingMs Parameter
MongoDB 7.0 adds the balancerMigrationsThrottlingMs
parameter which allows you to throttle the balancing rate.
enableDetailedConnectionHealthMetricLogLines Parameter
MongoDB 7.0 adds the enableDetailedConnectionHealthMetricLogLines
parameter which lets you specify whether or not a set of log messages related to cluster connection health metrics appears in the log.
oidcIdentityProviders
Parameter
MongoDB 7.0 adds the oidcIdentityProviders
parameter which allows you to specify identity provider (IDP) configurations when using OpenID Connect authentication.
configureQueryAnalysis-related Parameters
MongoDB 7.0 adds the following parameters related to the configureQueryAnalysis
command:
Security
Queryable Encryption General Availability
Starting in MongoDB 7.0, Queryable Encryption with equality queries is generally available (GA). Improvements in the GA make it incompatible with the Queryable Encryption Public Preview, which should not be used now that the feature is GA. For details, see Compatibility Changes in MongoDB 7.0.
KMIP 1.0 and 1.1 Support
MongoDB 7.0 (and 6.0.6) adds the useLegacyProtocol
setting. This setting allows MongoDB servers to connect to KMIP servers that use KMIP protocol version 1.0 or 1.1.
OpenSSL and FIPS Support
Starting in MongoDB 7.0 and 6.0.7, MongoDB supports OpenSSL 3.0 and the OpenSSL FIPS provider with these operating systems:
Red Hat Enterprise Linux 9
Amazon Linux 2023
Ubuntu Linux 22.04
Starting in MongoDB 8.0, MongoDB supports OpenSSL 3.0 and the OpenSSL FIPS provider for Amazon Linux 2023.3.
For details, see TLS/SSL (Transport Encryption).
OpenID Connect
Starting in 7.0, MongoDB Enterprise provides support for OpenID Connect authentication. OpenID Connect is an authentication layer built on top of OAuth2. You can use OpenID Connect to configure single sign-on between your MongoDB database and a third-party identity provider.
Aggregation
New operators:
Name | Description |
---|---|
Returns an approximation of the median, the 50th percentile, as a scalar value. This operator can be used as an accumulator and as an aggregation expression. | |
Returns an array of scalar values that correspond to specified percentile values. This operator can be used as an accumulator and as an aggregation expression. |
Month Name Specifier for $dateToString
MongoDB 7.0 adds the following format specifiers to use with the $dateToString
operator:
Specifiers | Description | Possible Values |
---|---|---|
| Abbreviated month name (3 letters) |
|
| Full month name |
|
Time Series
MongoDB 7.0 removes most of the time series limitations from these operations that are based on the delete
command:
Sharding
Sharding Metadata Diagnostics
Starting in MongoDB 7.0, the checkMetadataConsistency
command is available to check sharding metadata at the cluster, database, and collection levels for inconsistencies. These inconsistencies can originate in cases such as:
Upgrades in cases where the cluster encountered a bug while running previous releases of MongoDB
Manual interventions that corrupt the cluster catalog
The following helper methods are now available through mongosh
:
For more information on the inconsistencies the command checks for, see Inconsistency Types.
mergeAllChunksOnShard Command
Starting in MongoDB 7.0, the mergeAllChunksOnShard
command finds and merges all mergeable chunks that a shard owns for a given collection.
The AutoMerger
Starting in MongoDB 7.0, the AutoMerger can automatically merge chunks that meet the mergeability requirements. The AutoMerger is enabled by default.
Starting in MongoDB 7.0, you can use the following methods to control the AutoMerger behavior:
enableAutoMerger Parameter for configureCollectionBalancing
Starting in MongoDB 7.0, the configureCollectionBalancing
command accepts the enableAutoMerger
parameter. Use enableAutoMerger
to set whether or not the AutoMerger takes this collection into account.
operationsBlockedByRefresh Metrics Removed
MongoDB 7.0 removes the operationsBlockedByRefresh
document that contains statistics about operations blocked by catalog cache refresh activity because the operationsBlockedByRefresh
counters increased on mongos
for every operation that used collection routing information even if the operation wasn't blocked by a catalog refresh activity.
analyzeShardKey Command and db.collection.analyzeShardKey() Method
MongoDB 7.0 adds the analyzeShardKey
command and the db.collection.analyzeShardKey()
method, which let you calculate metrics for evaluating a shard key.
configureQueryAnalyzer Command and db.collection.configureQueryAnalyzer() Method
MongoDB 7.0 adds the configureQueryAnalyzer
command, which allows you to configure query sampling for a collection. MongoDB 7.0 also adds the db.collection.configureQueryAnalyzer()
, which wraps the configureQueryAnalyzer
command. Sampled queries provide information to analyzeShardKey
to calculate metrics about read and write distribution of a shard key.
Platform Support
Removed Platforms
MongoDB 7.0 removes support for RHEL 7 / CentOS 7 / Oracle 7 on the PPC64LE and s390x architectures.
Changes Introduced in MongoDB 6.3
Aggregation
MongoDB 6.3 introduces the following aggregation operators:
Operator | Description |
---|---|
Returns the result of a bitwise | |
Returns the result of a bitwise | |
Returns the result of a bitwise | |
Returns the result of a bitwise |
Connection Acquisition To Wire Log Message
Starting in MongoDB 6.3, a message is added to the log if the time that an operation waited between acquisition of a server connection and writing the bytes to send to the server over the network exceeds 1 millisecond. For details, see Connection Acquisition To Wire Log Message.
connPoolStats
Metrics
Starting in MongoDB 6.3, the connPoolStats
command has these output changes:
Document | Field(s) |
---|---|
New | Time ranges with the number of connection requests in each range. Total number of connection requests for all time ranges. |
explain
Output Includes Fields for Spilled Data File Size
Starting in MongoDB 6.3, the explain
output for the $group
stage includes new metrics on spill data when using the classic execution engine:
spillFileSizeBytes
, the size of the spill file written to disk in the$group
stagenumBytesSpilledEstimate
, estimate of the number of bytes written to disk in the$group
stage before compression
For details, see $sort
and $group
Stages.
serverStatus
Metrics
Starting in MongoDB 6.3, the serverStatus
command and the db.serverStatus()
method have these output changes:
Document | Field(s) |
---|---|
New | |
Addition to | |
New | |
Additions to | |
Addition to | |
Additions to |
Session Workflow Log Message
Starting in MongoDB 6.3, a message is added to the log if the time to send an operation response exceeds the slowms threshold option. For details, see Session Workflow Log Message.
Server Parameters
Starting in MongoDB 6.3, these server parameters were added:
slowConnectionThresholdMillis
sets the time limit to log the establishment of slow server connections.planCacheSize
sets the size of the plan cache for the slot-based query execution engine.
Time Series Collection Custom Bucketing Parameters
MongoDB 6.3 adds the following time series parameters:
bucketMaxSpanSeconds
sets the maximum time span between measurements in a bucket.bucketRoundingSeconds
sets the time interval that determines the starting timestamp for a new bucket.
compact
Support for Time Series Collections
Starting in MongoDB 6.3, the compact
command works with time series collections.
Changes Introduced in MongoDB 6.2
Collection Validation
Starting in MongoDB 6.2, the validate
command and db.collection.validate()
method:
Check collections to ensure the BSON documents conform to the BSON specifications.
Check time series collections for internal data inconsistencies.
Have a new option
checkBSONConformance
that enables comprehensive BSON checks.
Deprecated Commands
Starting in MongoDB 6.2, the following database commands are deprecated:
Use the $collStats
and $currentOp
aggregation stages instead.
serverStatus Metrics
Starting in MongoDB 6.2, the serverStatus
command output includes these new fields:
Starting in MongoDB 6.2, the serverStatus
command and the db.serverStatus()
method report the opLatencies
metric for mongos
instances. Latencies reported by mongos
include operation latency time and communication time between the mongod
and mongos
instances.
Server Parameters
Starting in MongoDB 6.2, mongod
adds these parameters:
Sharding
Starting in version 6.2, MongoDB removes the maxSize
field from the addShard
command. As a result:
Changes Introduced in MongoDB 6.1
$addFields and $set Allow Empty Objects as Expressions
Starting in MongoDB 6.1, the aggregation stages $addFields
and $set
allow you to set paths to empty objects without using the $literal
expression.
Auditing
MongoDB 6.1 adds the following cluster audit events:
Starting in MongoDB 6.1, the startup audit event has this structure:
{ originalClusterServerParameter: <original parameter value>, updatedClusterServerParameter": <new parameter value> }
For additional details, see Audit Event Actions, Details, and Results.
Balancing Policy Changes
Starting in MongoDB 6.1, data in sharded clusters is distributed based on data size rather than number of chunks. As a result, you should be aware of the following significant changes in sharded cluster data distribution behavior:
The balancer distributes ranges of data rather than chunks. The balancing policy looks for evenness of data distribution rather than chunk distribution.
Chunks are not subject to auto-splitting. Instead, chunks are split only when moved across shards.
A chunk is now referred to as a range.
moveRange
has replacedmoveChunk
.
Changes to Journaling
Starting in MongoDB 6.1, journaling is always enabled. As a result, MongoDB removes the storage.journal.enabled
option and the corresponding --journal
and --nojournal
command-line options.
currentOp
Metrics
Starting in MongoDB 6.1, the currentOp
command and the db.currentOp()
method have expanded output for resharding.
Resharding operations can involve multiple MongoDB instances, and MongoDB instances can play different roles in the resharding operation. The particular operation and the role the host instance plays in the resharding process determine when each metric updates.
Metric | Role Tracked | Description |
---|---|---|
| Removed. | |
| All | Describes the action taken. The value is one of:
For |
| All | This metric has a constant value: "command". |
| All | The namespace for the resharded index. The value is a string in the form: |
| All | A document that lists the command options for the operation. |
| Donor | The current state of the role's state machine. |
| Coordinator | The current state of the role's state machine. |
| Recipient | The current state of the role's state machine. |
approxDocumentsToCopy | Recipient | The number of documents in the source collection. |
documentsCopied | Recipient | The number of documents already copied. |
approxBytesToCopy | Recipient | The total size, in bytes, of the documents in the source collection. |
bytesCopied | Recipient | The number of bytes copied. When resharding completes, this value is similar to the value of |
oplogEntriesFetched | Recipient | The number of oplog entries written to the oplog buffer collection. |
oplogEntriesApplied | Recipient | The number of oplog entries applied from the oplog buffer collection. |
insertsApplied | Recipient | The number of inserts applied to the temporary resharding collection. Each oplog entry that involves an insert increments the counter by 1. |
updatesApplied | Recipient | The number of updates applied to the temporary resharding collection. Each oplog entry that involves an update increments the counter by 1. |
deletesApplied | Recipient | The number of deletes applied to the temporary resharding collection. Each oplog entry that involves a delete increments the counter by 1. |
totalOperationTimeElapsedSecs | All | The number of seconds since the operation began. |
totalCopyTimeElapsedSecs | Recipient | The number of seconds spent cloning. |
totalCopyTimeElapsedSecs | Coordinator | The maximum number of seconds a Recipient could have spent cloning. |
totalApplyTimeElapsedSecs | Recipient | The number of seconds spent applying changes. |
totalApplyTimeElapsedSecs | Coordinator | The approximate maximum number of seconds a Recipient could have spent applying changes. |
totalCriticalSectionTimeElapsedSecs | Recipient | The number of seconds spent in the critical section. |
totalCriticalSectionTimeElapsedSecs | Coordinator | The number of seconds the critical section could have been held. |
remainingOperationTimeEstimatedSecs | Recipient | The estimated number of seconds until the operation completes. |
allShardsLowestRemainingOperationTimeEstimatedSecs | Coordinator | Calculated across all shards, the lowest estimate of the number of seconds remaining. |
allShardsHighestRemainingOperationTimeEstimatedSecs | Coordinator | Calculated across all shards, the highest estimate of the number of seconds remaining. |
countWritesToStashCollections | Recipient | The number of writes to the recipient stash collections. |
countWritesDuringCriticalSection | Donor | The number of writes attempted during the donor's critical section. |
countReadsDuringCriticalSection | Donor | The number of reads attempted during the donor's critical section. |
Improved Efficiency for Multiple Document Deletions
Starting in MongoDB 6.1:
PCRE Library Upgrade
Perl Compatible Regular Expressions (PCRE) is the library used by MongoDB to implement regular expression pattern matching. Starting in version 6.1, MongoDB upgrades the PCRE library to PCRE2. PCRE2 is the current PCRE library and is actively maintained and updated.
To learn how to perform regex matches in MongoDB, see the following pages:
$regex
(query operator)$regexFind
(aggregation operator)$regexFindAll
(aggregation operator)$regexMatch
(aggregation operator)
Retryable Writes Error Handling
Starting in MongoDB 6.1, if both the first and second attempt of a retryable write fail without a single write being performed, MongoDB returns an error with the NoWritesPerformed
label.
The NoWritesPerformed
label differentiates the results of batch operations like insertMany()
. In an insertMany
operation, one of the following outcomes can occur:
Outcome | MongoDB Output |
---|---|
No documents are inserted. | Error returned with |
Partial work done. (At least one document is inserted, but not all.) | Error returned without |
All documents are inserted. | Success returned. |
Applications can use the NoWritesPerformed
label to definitively determine that no documents were inserted. This error reporting lets the application maintain an accurate state of the database when handling retryable writes.
In previous versions of MongoDB, an error is returned when both the first and second attempts of a retryable write fail. However, there is no distinction made to indicate that no writes were performed.
Resharding
Starting in MongoDB 6.1, there are new metrics available resharding. The output of the following commands has changed:
Server Parameters
Starting in MongoDB 6.1, MongoDB adds the following new parameters:
temporarilyUnavailableBackoffBaseMs
adjusts the time between retries after a write failure.temporarilyUnavailableMaxRetries
limits the number of retries after a write failure.ldapRetryCount
sets the number of operation retries by the server LDAP manager after a network error.
serverStatus
Metrics
Starting in MongoDB 6.1, the serverStatus
command and the db.serverStatus()
method have these output changes:
New Metrics
countWritesToStashCollections
The number of writes to the recipient stash collection.latencies
Timing metrics for resharding operations.collectionCloningTotalRemoteBatchRetrievalTimeMillis
Total time recipients spent retrieving batches of documents from donors, in milliseconds.collectionCloningTotalRemoteBatchesRetrieved
Total number of batches of documents recipients retrieved from donors.collectionCloningTotalLocalInsertTimeMillis
Total time recipients spent inserting batches of document from donors, in milliseconds.collectionCloningTotalLocalInserts
Total number of batches of documents from donors that recipients inserted.oplogFetchingTotalRemoteBatchRetrievalTimeMillis
Total time recipients spent retrieving batches of oplog entries from donors, in milliseconds.oplogFetchingTotalRemoteBatchesRetrieved
Total number of batches of oplog entries recipients retrieved from donors.oplogFetchingTotalLocalInsertTimeMillis
Total time recipients spent inserting batches of oplog entries from donors, in milliseconds.oplogFetchingTotalLocalInserts
Total number of batches of oplog entries from donors that recipients inserted.oplogApplyingTotalLocalBatchRetrievalTimeMillis
Total time recipients spent retrieving batches of oplog entries that were inserted during fetching, in milliseconds.oplogApplyingTotalLocalBatchesRetrieved
Total number of batches of oplog entries that were inserted during fetching that recipients retrieved.oplogApplyingTotalLocalBatchApplyTimeMillis
Total time recipients spent applying batches of oplog entries, in milliseconds.oplogApplyingTotalLocalBatchesApplied
Total number of batches of oplog entries that recipients applied.
Replaced Metrics
resharding.remainingOperationTimeEstimatedMillis
is replaced by:
Renamed Metrics
countReshardingSuccessful
is nowcountSucceeded
countReshardingFailures
is nowcountFailed
countReshardingOperations
is nowcountStarted
countReshardingCanceled
is nowcountCanceled
minShardRemainingOperationTimeEstimatedMillis
is nowcoordinatorAllShardsLowestRemainingOperationTimeEstimatedMillis
maxShardRemainingOperationTimeEstimatedMillis
is nowcoordinatorAllShardsHighestRemainingOperationTimeEstimatedMillis
resharding.opcounters.insert
is nowinsertsApplied
resharding.opcounters.update
is nowupdatesApplied
resharding.opcounters.delete
is nowdeletesApplied
Removed Metrics
oplogApplierApplyBatchLatencyMillis
collClonerFillBatchForInsertLatencyMillis
Storage Engine
In rare circumstances, a write can fail due to cache pressure. When this happens MongoDB issues a TemporarilyUnavailable
error and increments the temporarilyUnavailableErrors
counter in two places: the slow query log and the Full Time Diagnostic Data Capture (FTDC).
Individual operations within multi-document transactions never return TemporarilyUnavailable
errors.
Adjust the write retry properties by modifying the temporarilyUnavailableBackoffBaseMs
and temporarilyUnavailableMaxRetries
parameters.
*UCP
Regex Option to Match Non-ASCII Characters
Starting in MongoDB 6.1, you can use the *UCP
option for regex queries. The *UCP
option matches non-ASCII characters (specifically, the option can match UTF-8 characters). However, the *UCP
option results in a slower query than one without the option specified.
For an example that uses the *UCP
option, see Extend Regex Options to Match Characters Outside of ASCII.
Upgrade Procedures
Important
Feature Compatibility Version
To upgrade to MongoDB 7.0 from a 6.0 deployment, the 6.0 deployment must have featureCompatibilityVersion
set to 6.0
. To check the version:
db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
To upgrade to MongoDB 7.0, refer to the upgrade instructions specific to your MongoDB deployment:
If you need guidance on upgrading to 7.0, MongoDB professional services offer major version upgrade support to help ensure a smooth transition without interruption to your MongoDB application. To learn more, see MongoDB Consulting.
Downgrade Considerations
Only Single-Version Downgrades are Supported
MongoDB only supports single-version downgrades. You cannot downgrade to a release that is multiple versions behind your current release.
For example, you can downgrade a 7.0-series to a 6.0-series deployment. However, further downgrading that 6.0-series deployment to a 5.0-series deployment is not supported.
Downgrade Policy Changes
Starting in MongoDB 7.0:
Binary downgrades are no longer supported for MongoDB Community Edition.
You cannot downgrade your deployment's FCV to or from a rapid release version of MongoDB.
The
setFeatureCompatibilityVersion
command requires an additional parameter,confirm
, which must be set totrue
to upgrade or downgrade FCV.If you upgrade or downgrade your deployment's FCV, you cannot downgrade your Enterprise deployment's binary version without assistance from support.
Backward-Incompatible Features
MongoDB 7.0 includes features that are not compatible with earlier releases. Downgrading from 7.0 to an earlier release requires that you remove data that uses these features.
For more information, see Backward-Incompatible Features.
Download
To download MongoDB 7.0, go to the MongoDB Download Center.
Report an Issue
To report an issue, see the MongoDB GitHub repository for instructions on how to file a JIRA ticket for the MongoDB server or one of the related projects.