Docs Menu
Docs Home
/
MongoDB Manual

Release Notes for MongoDB 7.1

On this page

  • Patch Releases
  • Aggregation
  • General Changes
  • serverStatus Output Change

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.

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

  • All JIRA issues closed in 7.1.1

  • 7.1.1 Changelog

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.

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.

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

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.

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.

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:

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.

MongoDB 7.1 adds the auditConfig cluster parameter, which contains information on audit configurations from mongod and mongos server instances.

MongoDB 7.1 adds the indexBuildMinAvailableDiskSpaceMB parameter, which allows you to set the minimum available disk space required for index builds.

Starting in MongoDB 7.1, findAndModify and deleteOne() can use a partial shard key to query on a sharded collection.

Starting in MongoDB 7.1, mongos accepts --port values from [0, 65535]. For more information, see --port.

Starting in MongoDB 7.1, the hint field is available in the distinct command, allowing you to specify the query's index.

Starting in MongoDB 7.1, you can create TTL indexes on capped collections.

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 includes the following new fields in its output:

Change Stream Metrics
Query Stats Metrics

Next

What is MongoDB?