What is New in MongoDB 7.0

MongoDB Logo

Introduction

MongoDB 7.0 is a major release, and it includes several new features and modifications

Atlas Search Index Management

Beginning with MongoDB 7.0, Atlas Search indexes may be managed using Mongosh methods and database commands instead of the previous manual process.

Changes to the General Architecture A new cache refresh time column has been added to the log messages generated for slow queries. New fields have been incorporated into the currentOp command and the db.currentOp() method.

  • Compound Wildcard Indexes: Beginning with version 7.0 of MongoDB, you can create compound wildcard indexes.
  • Modification of Time Series Data: This new edition adds the capability to modify time series data. New Operators and Variables for Aggregation Pipelines: Aggregation pipelines now have access to new operators and variables.
  • Change Streams Have Been Improved: Change streams have been improved. Queryable Encryption (Support for Equality Queries): This version introduces queryable encryption (support for equality queries).

There are more critical considerations in release notes covering these topics

Security: MongoDB 7.0 has made several updates to security, and encryption has been introduced:

  • Queryable Encryption: This feature supports equality queries and has reached General Availability (GA). The GA version is incompatible with the previous Public Preview version.
  • KMIP 1.0 and 1.1 Support: A new setting called useLegacyProtocol is introduced, allowing MongoDB servers to connect to KMIP servers running older protocol versions (1.0 or 1.1).
  • OpenSSL and FIPS Support: MongoDB versions 7.0 and 6.0.7 now support OpenSSL 3.0 and the OpenSSL FIPS provider. This is available on Red Hat Enterprise Linux 9, Amazon Linux 2023, and Ubuntu Linux 22.04.
  • OpenID Connect: MongoDB Enterprise 7.0 now supports OpenID Connect authentication, facilitating single sign-on capabilities with third-party identity providers.

New Aggregation Stages

MongoDB 7.0 has introduced new aggregation stages, $median, and $percentile.

  • $median is an operator that returns an approximate median, or 50th percentile, of a set of values and can be used both as an accumulator and an aggregation expression.
  • $percentile is an operator that returns an array of values corresponding to specified percentiles and can also be used as both an accumulator and an aggregation expression. Aggregation in MongoDB is an operation that processes data records and returns computed results.

Time Series Changes

There have been changes to time series data in MongoDB 7.0. Time series data is a sequence of data points indexed in time order. It’s often used in meteorology, finance, and health care, where data is collected over time. Most of the time, series limitations are associated with delete operations—delete, deleteOne(), deleteMany(), Bulk.find.delete(), and Bulk.find.deleteOne()—has been removed.

Sharding Changes

Sharding is a method for distributing data across multiple machines. MongoDB 7.0 includes changes introduced in MongoDB Rapid Releases 6.1, 6.2, and 6.3.

  • mergeAllChunksOnShard Command: Starting in MongoDB 7.0, this command merges all mergeable chunks owned by a shard for a specific collection.
  • The AutoMerger: Introduced in MongoDB 7.0, this feature automatically merges chunks that meet specific criteria and is enabled by default.
  • Control Methods for AutoMerger: MongoDB 7.0 allows the use of methods like sh.startAutoMerger(), sh.stopAutoMerger(), sh.enableAutoMerger(), and sh.disableAutoMerger() to control AutoMerger behavior.
  • enableAutoMerger Parameter for configureCollectionBalancing: In MongoDB 7.0, this parameter can be used to decide whether AutoMerger considers a specific collection.
  • rangeDeleterHighPriority Parameter: This new parameter allows for prioritizing or deprioritizing the cleanup of orphaned documents in MongoDB 7.0.
  • operationsBlockedByRefresh Metrics Removed: MongoDB 7.0 eliminates this metrics document, which previously tracked operations affected by catalog cache refreshes, as it was deemed inaccurate.
  • analyzeShardKey Command and db.collection.analyzeShardKey() Method: These new features in MongoDB 7.0 help evaluate a shard key's effectiveness through calculated metrics.
  • configureQueryAnalyzer Command and db.collection.configureQueryAnalyzer() Method: Introduced in MongoDB 7.0, these features allow the configuration of query sampling, providing data that can be analyzed to evaluate the shard key's read and write distribution.

Platform Support

MongoDB 7.0 may have made changes to the platforms it supports. This could include adding support for new platforms or dropping support for older ones.

Upgrade Procedures

Upgrading to MongoDB 7.0 involves several steps, including shutting down the instance, replacing the 6.0 binaries with the 7.0 binaries, and enabling backward-incompatible 7.0 features. Testing the upgrade in a staging environment before deploying it to production is recommended.

The Evolution of MongoDB

MongoDB is a NoSQL database that was developed by 10gen, a business started in 2007 by Dwight Merriman and Eliot Horowitz. The original goal of 10gen was to create an open-source platform-as-a-service architecture; however, the firm altered its focus to simply the database layer, which was later released as an open-source project in 2009.

The word "MongoDB" is an abbreviation for "humongous," referring to the database's capacity to scale easily and manage massive amounts of data. It was created as a document-oriented database to solve the constraints of standard relational databases by providing high performance, automatic scaling, and a flexible schema design.

MongoDB soon became popular because of its ease of use and scalability. MongoDB Inc., to which 10gen rebranded itself, has been essential in its development, including features such as horizontal scaling via sharding, real-time aggregation, and full-text search capabilities.

MongoDB Inc. launched the MongoDB Management Service in 2013, a cloud-based system for managing MongoDB deployments that evolved into MongoDB Atlas, a fully-managed cloud-based database service, in 2014.


Similar Articles