MongoDB 7.0 is a game-changer in the world of NoSQL databases. In Part 1 of our series, we explore the technical underpinnings of this major release, including performance boosts and advanced security measures. This blog 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.
Atlas Search Index Management
Starting with MongoDB 7.0, you can manage Atlas Search indexes with mongosh methods and database commands. Atlas Search index commands are only available for deployments hosted on MongoDB Atlas, and require an Atlas cluster tier of at least M10.
Atlas Search Indexes
Atlas Search indexes are a mapping between terms and the corresponding documents that encompass those terms. They enhance the speed of retrieving documents through specific identifiers. You must configure an Atlas Search index to query data in your Atlas cluster using Atlas Search.
You can specify the fields to index using the following methods:
- Dynamic mappings, enable Atlas Search to automatically index all the fields of supported types in each document. This takes disk space and might negatively impact cluster performance.
- Static mappings, allow you to selectively identify the fields to index.
To manage Atlas Search indexes, use the following commands:
Mongosh Methods
Database Commands
Aggregation Stages
Security
Queryable Encryption General Availability
Starting with MongoDB 7.0, Queryable Encryption with equality queries is generally available (GA). The improvements in the GA version make it incompatible with the Queryable Encryption Public Preview, which should no longer 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 with 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
OpenID Connect
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 a single sign-on between your MongoDB database and a third-party identity provider.
Aggregation
New aggregation operations are available from the MongoDB version 7.0
Time Series
MongoDB 7.0 removes most of the time series limitations from these operations that are based on the delete command:
Sharding
mergeAllChunksOnShard Command
Starting with MongoDB 7.0, the mergeAllChunksOnShard command finds and merges all mergeable chunks that a shard owns for a given collection.
The AutoMerger
Starting with MongoDB 7.0, the AutoMerger can automatically merge chunks that meet the mergeability requirements. The AutoMerger is enabled by default.
Starting with MongoDB 7.0, you can use the following methods to control the AutoMerger behaviour
enableAutoMerger Parameter for configureCollectionBalancing
Starting with MongoDB 7.0, the configureCollectionBalancing command accepts the enableAutoMerger parameter. Use enableAutoMerger to set whether or not the AutoMerger takes this collection into account.
rangeDeleterHighPriority Parameter for Deprioritizing Range deletions
Starting with MongoDB 7.0, you can prioritize or deprioritize cleanup of orphaned documents over user operations using the rangeDeleterHighPriority parameter.
operationsBlockedByRefresh Metrics Removed
MongoDB 7.0 removes the operationsBlockedByRefresh document that contains statistics about operations blocked by catalogue 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 catalogue 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 the read and write distribution of a shard key.
Upgrade Procedures
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. Downgrade Considerations
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 may 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 with 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 to true 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.
MongoDB 7.0 stands as a testament to MongoDB's commitment to innovation and performance. With its array of new features, security enhancements, and improved functionalities, this release is a powerful tool for developers and database administrators alike. As you navigate the complex landscape of modern data management, MongoDB 7.0 is a formidable ally.
Stay connected with Mydbops blogs for more technical insights and discoveries in the MongoDB ecosystem.