Release Notes for MongoDB 7.1
Important
MongoDB 8.1 is a rapid release and is only supported for MongoDB Atlas. MongoDB 8.1 is not supported for use on-premises. For more information, see MongoDB Versioning.
Patch Releases
7.1.1 - Nov 27, 2023
Issues fixed:
SERVER-81106 Recipient shard doesn't wait for the collection version to be locally persisted before starting the cloning phase
SERVER-81133 Speedup logic to persist routing table cache
SERVER-81201 Limiting the memory usage during the cloning phase on the recipient shard
SERVER-81966 Avoid modification of previous ChunkMap instances during refresh
WT-7929 Investigate a solution to avoid FTDC stalls during checkpoint
Aggregation
New Aggregation Stages
MongoDB 7.1 introduces the following aggregation stages:
Stage | Description |
---|---|
Returns runtime statistics for recorded queries. |
Warning
The $queryStats
aggregation stage is unsupported and is not
guaranteed to be stable in a future release. Don't build
functionality that relies on a specific output format of this stage,
since the output may change in a future release.
General Changes
UpdateOne upsert
Behavior on Sharded Collections
Starting in MongoDB 7.1, when using
updateOne()
with upsert: true
on a
sharded collection, you do not need to include the full shard key
in the filter.
Concurrent DDL Operations
Starting in MongoDB 7.1, when you run multiple DDL operations that target different collections from the same database, MongoDB runs those operations concurrently.
This change adds two new types to the serverStatus
locks
field and currentOp.locks
output:
DDLDatabase
DDLCollection
Exhaust Cursors Enabled for Sharded Clusters
Starting in MongoDB 7.1, mongos
supports exhaust cursors
when a client's getMore request sets
the exhaustAllowed flag. This can improve query
performance on sharded clusters when the client receives multiple replies
from the database server for a single request.
Improved Index Builds
Starting in MongoDB 7.1, index builds are improved with faster error
reporting and increased failure resilience. You can also set the minimum
available disk space required for index builds using the new
indexBuildMinAvailableDiskSpaceMB
parameter, which stops
index builds if disk space is too low.
The following new index build metrics were added:
For full details, see Index Builds.
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:
Self-Managed Backups of Sharded Clusters
Starting in MongoDB 7.1, the fsync
and fsyncUnlock
commands can perform fsync operations on sharded clusters.
When run on mongos
with the lock
field set to true
, the
fsync
command flushes writes from the storage layer to disk and
locks each shard, preventing additional writes. The fsyncUnlock
command can then be used to unlock the cluster.
This feature enables self-managed backups of sharded clusters using
mongodump
.
New Parameters
auditConfig Parameter
MongoDB 7.1 adds the auditConfig
cluster parameter, which contains
information on audit configurations from mongod
and
mongos
server instances.
indexBuildMinAvailableDiskSpaceMB Parameter
MongoDB 7.1 adds the indexBuildMinAvailableDiskSpaceMB
parameter, which allows you to set the minimum available disk space
required for index builds.
Query with Partial Shard Key
Starting in MongoDB 7.1, findAndModify
and deleteOne()
can use a partial shard key to query on a sharded collection.
mongos Port Range
Starting in MongoDB 7.1, mongos
accepts --port
values
from [0, 65535]. For more information, see --port
.
Specify a query's index using the hint field
Starting in MongoDB 7.1, the hint field is available in the distinct
command,
allowing you to specify the query's index.
TTL Indexes
Starting in MongoDB 7.1, you can create TTL indexes on capped collections.
Error Codes for Exceeding Pipeline Size Limit
Starting in MongoDB 7.1, an aggregation command will throw an error when a pipeline exceeds the pipeline stage limit. For more details, see Number of Stages Restrictions.
serverStatus Output Change
serverStatus
includes the following new fields in its
output:
- Change Stream Metrics
- Query Stats Metrics