Percona Server for MongoDB 8.0.4-1 (2024-12-17)¶
We are pleased to announce the new major version of Percona Server for MongoDB 8.0.4-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 through MongoDB 8.0.4 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 .
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 thefsync
command with thelock
field set totrue
frommongos
to lock each shard and prevent further writes. Then, runfsynckUnlock
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-73641 - Fix the issue with timeseries filtering missing extended-range events when sharded
- SERVER-82037 - Fixed the issue with extreme memory usage by sorter by limiting the number of file iterators a sorter can create
- SERVER-94559 - Fixed the issue with tracking the archived bucket based on the minTime in the bucket registry for time series measurements by leaving the bucket’s minTime unchanged when performing user deletes/updates on it
- SERVER-95067 - Handle multiple batches per bucket in time-series insert
- SERVER-95724 - Make resharding unroll multiple applyOps when it clones the retryable write session info to a recipient
- SERVER-93205 - Enabled the
indexStats
section of theserverStatus
command output to track indexes in theprepareUnique
state. - SERVER-92762 - Improved the resilience and performance of sharding in the cluster by setting the default value of
numInitialChunks
inreshardCollection
to 90. - SERVER-91777 - Disabled oplog sampling during restore procedure to optimize the restore time
- SERVER-90965 - Extended query settings to include optional comment field. This may be helpful to persist details about a change for audit or easier troubleshooting. Read more in https://www.mongodb.com/docs/manual/reference/command/setQuerySettings/
- WT-13377 - Reconfiguring a session with
cache_max_wait_ms
now accepts a value of zero - SERVER-94970 - Fixed the issue with sharded
$searchMeta
queries in a$lookup
and$unionWith
failing by hitting anunreachable_tassert
- SERVER-95240 - Removed PeerID from SSL handshakes
- SERVER-95067 - Fixed the issue with time-series inserts generating multiple batches referencing the same bucket.
- SERVER-84769 - Changed the resharding remainingOpTime algorithm by adding initial delay to resharding commit monitor query
- SERVER-67816 - Fixed time rounding for timeseries control block of dates prior to 1970
- SERVER-96419 - Fixed the issue with improper neutralization of null bytes that may have led to buffer over-reads in MongoDB Server
- SERVER-95279 - Use a new C++ type for BSON field names to ensure validity
- 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.4 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.