Skip to content

Percona Server for MongoDB 8.0.1-1 (2024-10-30)

Installation Upgrade

We are pleased to announce the release candidate of the new major version of Percona Server for MongoDB 8.0.1-1 – the drop in replacement for MongoDB Community Edition. Percona Server for MongoDB supports MongoDB Community protocols and drivers and enhances it with the enterprise-grade features for free, enabling you to effectively meet the requirements of your organization in terms of high-availability, reliability and data security.

This release of Percona Server for MongoDB includes the improvements and bug fixes of MongoDB 8.0.0 Community Edition and MongoDB 8.0.1 Community Edition

Upgrade considerations

Starting with version 8.0, Percona Server for MongoDB uses the upgraded TCMalloc to handle memory requests more efficiently. The use of TCMalloc requires you to enable Transparent Huge Pages (THP) and per-CPU caches before you start Percona Server for MongoDB. In MongoDB 8.0 and later, ensure that THP is enabled before mongod starts by creating a service file for your platform’s initialization system. If you are using MongoDB 7.0 or earlier - disable THP.

Read more about TCMalloc in MongoDB documentation :octicons-external-link-16:

Release Highlights

In addition to the upstream improvements, Percona Server for MongoDB features the following improvements:

Prevent master encryption key loss on the Vault server

Before Percona Server for MongoDB puts a new master encryption key to the Vault server as the versioned secret, it now checks if the secret’s version reached the defined maximum (10 by default). This prevents the loss of the old secret and the master encryption key it stores on the Vault server.

Make sure Percona Server for MongoDB has read permissions for the secret’s metadata and the secrets engine configuration. To learn more, refer to the documentation.

Join Percona Squad

Participate in monthly SWAG raffles, get an early access to new product features and invite-only “ask me anything” sessions with database performance experts. Interested? Fill in the form at squad.percona.com/mongodb.

Upstream Improvements

MongoDB 8.0 introduces a lot of major changes. We recommend testing it on staging environments before using it in production. The features and improvements in MongoDB 8.0 are focused on the following main areas:

Performance improvements

  • Benefit from faster performance when working with time series collections. A new algorithm enhances time series speed by processing queries in “blocks” of data rather than individual values.
  • Insert operations for multi-document transactions no longer produce single oplog entries. Instead, they are now batched as a single entry. This change increases multi-document insert performance and improves replication efficiency, reducing lag.
  • Oplog buffers for replication are now introduced. A new writer thread reads new entries from the primary and writes them to the local oplog on each secondary. An independent applier thread asynchronously applies changes to the local database, increasing replication throughput.
  • The upgraded TCMalloc version is now the default in MongoDB. Together with THP and per-CPU cache, it reduces memory fragmentation by 18% which is especially useful during peak loads.

Workload management

Analyze query performance and manage the workload in your system using query shapes. A query shape is a set of specifications to group similar queries together. For a query shape, you add query settings instead of index filters. Query settings are persistent meaning that they remain after the cluster restart thus saving you from rerunning them in your application. A query shape has the queryShapeHash parameter using which you can check if the operation causes excessive workload and deny it using operation rejection filters.

Developer experience

  • Insert, update or delete multiple collections in one request with the new bulkWrite command. Previously you could only run these operations on a single collection.
  • Several enhancements are made to the index build process such as a better error handling and tolerance to disk space issues. This avoids common secondary crashes due to errors.

Sharding improvements

  • To better optimize resources or distribute the data more evenly across the shards, you can now move a single unsharded collection to any shard with the new moveCollection command. This operation is going online and the collection data is fully available during the migration. This new way to move data is flexible and the read and write behavior when you query data is transparent.
  • Ensuring even data distribution across shards in your cluster is crucial. Starting with MongoDB 5.0, you can reshard a collection using a different shard key, although this operation is time-consuming. In MongoDB 8.0, you can reshard a collection using the same shard key, significantly boosting performance. This is especially beneficial for large collections, reducing resharding time from days to several hours. You can dynamically reallocate your resources based on the workload. The process is online, so your operations run uninterrupted. The ability to add or remove shards without changing the shard key makes the whole resharding process straightforward.
  • You can now unshard a collection if it should reside on a single shard or the collection requires resource isolation. You can either specify the desired shard or the collection will be moved onto the shard with the least load.
  • You can now save costs on additional computing resources when deploying a sharded cluster. The config server replica set can now store both the configuration and the database data. Such a deployment is recommended for small clusters and is especially useful for evaluating the cluster without having to pay extra costs.
  • You can now make self-managed backups in sharded clusters using mongodump. Run the fsync command with the lock field set to true from mongos to lock each shard and prevent further writes. Then, run fsynckUnlock to unlock shards. Note that this process blocks all database writes while the fsync is in place.

Logging improvements

You can now configure database profiler to log slow operations based on the time MongoDB actually spent processing that operation. This gives you more accuracy when you analyze performance.

Security improvements

  • You can now run range queries on encrypted fields, specifically for numeric data types and dates. This expands the range of use cases for Manual Queryable Encryption, including accounting operations, healthcare, financial services, and other strictly regulated data operations where data safety is crucial.

Other improvements include the following:

  • SERVER-76883 - Suppressed the “role does not exist” warning log for LDAP group role resolution
  • SERVER-82221 - Included commit-pending metadata entries to the listCollections and listIndexes output
  • SERVER-94635 - Improved handling of logical session refresh by making the session refresh parameters configurable
  • SERVER-95244 - Fixed the tassert() failure for upsert operations run when a client connects directly to shard
  • WT-13409 - Fixed the data corruption issue by properly handling a return value from a function call in transaction checkpoint in WiredTiger

Find the full list of changes in the MongoDB 8.0.1 Community Edition release notes

Changelog

Improvements

  • PSMDB-1441 - Fixed the issue with master encryption keys getting lost when the number of created secrets exceeds the threshold by preventing a new secret creation and alerting users about it.

Fixed Bugs

  • PSMDB-1527 - Improve the activateKeys option handling by changing its type to boolean.

Get expert help

If you need assistance, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services.