tencent cloud

TencentDB for MongoDB

Release Notes and Announcements
Release Notes
Announcements
User Guide
Product Introduction
Overview
Strengths
Use Cases
Cluster Architecture
Product Specifications
Features
Regions and AZs
Terms
Service Regions and Service Providers
Purchase Guide
Billing Overview
MongoDB Pricing
Billing Formula
Payment Overdue
Backup Space Billing
Configuration Adjustment Billing
Getting Started
Quickly Creating an Instance
Connecting to a TencentDB for MongoDB Instance
Reading/Writing Database
Operation Guide
Access Management
Instance Management
Node Management
Version Upgrade
Network Configuration
Monitoring
Backup and Rollback
Database Audit
Data Security
SSL Authentication
Log Management
Database Management
Multi-AZ Deployment
Disaster Recovery/Read-Only Instances
Parameter Configuration
Recycle Bin
Task Management
Performance Optimization
Data Migration Guide
Practical Tutorial
Optimizing Indexes to Break Through Read/Write Performance Bottlenecks
Troubleshooting Mongos Load Imbalance in Sharded Cluster
Considerations for Using Shard Clusters
Sample of Reading and Writing Data in MongoDB Instance
Methods for Importing and Exporting Data Based on CVM Connected with MongoDB
What to Do for Errors of Repeated Instance Creation and Deletion of Databases with the Same Names?
Troubleshooting MongoDB Connection Failures
Shard Removal Task: Guide for Confirming the Progress and Troubleshooting Issues
Performance Fine-Tuning
Ops and Development Guide
Development Specifications
Command Support in Sharded Cluster v3.2
Command Support in v3.6
Development Ops
Troubleshooting
Increased Slow Queries
Number of Connections Exceeding Limit
API Documentation
History
Introduction
API Category
Making API Requests
Instance APIs
Backup APIs
Account APIs
Other APIs
Task APIs
Introduction
Data Types
Error Codes
Instance Connection
Shell Connection Sample
PHP Connection Sample
Node.js Connection Sample
Java Connection Sample
Python Connection Sample
Python Read/Write Sample
Go Connection Sample
PHP Reconnection Sample
Product Performance
Test Environment
Test Method
Test Result
FAQs
Cost
Features
Sharded Cluster
Instance
Rollback and Backup
Connection
Data Migration
Others
Service Agreement
Service Level Agreement
Terms of Service
Glossary
Contact Us

Overview of 8.0 New Features

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2025-11-27 17:55:56
For a complete list of changes and details of new features in MongoDB 8.0, see the official MongoDB 8.0 release notes.
Category
Feature Name
Description
Use Case/Impact
Performance optimization
Enhanced TCMalloc
Caching mechanism: changed from per-thread caching to per-CPU caching to reduce memory fragmentation and improve adaptability under high load.
Memory release: a background thread that attempts to release memory to the operating system per second is added. The tcmallocReleaseRate parameter allows precise control of the release rate (in the unit of Bytes/s), with a default value of 10 MB/s.
More efficient memory usage is achieved, and it is especially suitable for scenarios with high memory pressure and significant load fluctuations.
Majority write optimization
When write concern is set to "majority", acknowledgment is returned once the oplog is written to a majority of nodes, without waiting for the data application.
This significantly improves throughput and reduces latency for majority writes.
oplog processing optimization
MongoDB 8.0 introduces an oplog buffer on secondary nodes, decoupling the data synchronization process into two independent stages: the Writer thread continuously pulls and buffers oplogs, while the Applier thread asynchronously applies data from the buffer. This allows parallel execution of the two threads, eliminating resource waste caused by serial waiting.
This improves the data replication throughput of secondary nodes and reduces replication latency between primary and secondary nodes.
Batch insertion optimization
Non-transactional batch insertions are merged into a single oplog entry, with all documents sharing the same clusterTime in the Change Stream.
This improves batch insertion performance and reduces replication latency caused by secondary nodes replaying a large volume of oplog entries.
Shard enhancement
reshard optimization
forceRedistribution: allows for resharding using the same shard key to quickly redistribute data to new shards.
commitReshardCollection: enables proactive disabling of write operations during the Ops window to accelerate the completion of data shard migration.
This provides faster and more flexible data redistribution, which facilitates load balancing and capacity planning.
Shard management commands
unshardCollection: unshards a collection by merging data into a specified shard.
moveCollection: moves an unsharded collection to any shard (excluding time series and encrypted collections).
shardAndDistributeCollection: redistributes data immediately after sharding.
This provides more granular and flexible collection-level data layout management capabilities.
Shard operation optimization
Hashed sharding: By default, 1 chunk is created per shard (previously 2 chunks per shard).
findAndModify/deleteOne: Partial shard keys can be used as query conditions.
updateOne with upsert: For sharded collections, the query conditions of the upsert operation do not need to include all the shard keys.
directShardOperations role: Commands are allowed to be run directly on shards for shard operations.
This simplifies Ops and queries for sharded clusters, enhancing usability.
serverStatus output enhancement
Starting from MongoDB 8.0, the serverStatus output includes the following new shardingStatistics fields:
This provides a more comprehensive view of the running status and internal statistical metrics of sharded clusters.
Query and aggregation
Query statistics and optimization
$queryStats: returns detailed statistics for recorded queries.
Query Shape: introduces a new query shape, upgrading query pattern recognition from a passive cache management mechanism to an independently configurable and manageable resource.
workingMillis: displays actual execution time in the slow log, excluding lock waiting time.
This provides a more powerful tool for query performance diagnosis and optimization, facilitating the location of performance bottlenecks.
Aggregation and transformation
$convert: supports conversion between strings and BinData.
$toUUID: provides a simplified syntax for converting strings to UUID.
This enhances data processing and conversion capabilities.
Operation control
The defaultMaxTimeMS parameter is added to allow settings of the default timeout period on the server side for operations such as find and aggregate.
This helps prevent long-running queries from exhausting resources and improves system stability.
Security feature
Queryable encryption
It is supported to use range query operators (such as $lt, $lte, $gt, and $gte) on the encrypted fields.
This provides more complex query capabilities while ensuring data privacy, thereby enhancing security.
Ops improvement
Logging improvement
Starting from MongoDB 8.0, the database profiler can be configured to log slow operations based on the actual processing time spent by MongoDB (instead of the total latency of the slow operation). For more information, see Logging.
This avoids misclassifying operations as slow operations due to lock waiting or traffic control.
Index building enhancement
Fast error reporting: Index building errors are returned immediately during the scanning phase without the need to wait for completion.
Elastic deployment: Secondary nodes can request to stop problematic index building to prevent crashes.
Disk space management: Index building is automatically stopped when the available disk space falls below the value of indexBuildMinAvailableDiskSpaceMB.
This makes the index building process more robust, enables faster fault recovery, and minimizes the impact on businesses.
Batch and concurrent operations
bulkWrite: performs insertion, update, and deletion operations on multiple collections in a single request.
Concurrent DDL: supports concurrent execution of DDL operations on different collections under the same database.
This enhances the Ops efficiency and batch data processing capabilities.
Admission control
Entry queue: controls network request queuing through the ingressAdmissionControllerTicketPoolSize parameter.
This provides a new traffic control mechanism to prevent system overload.
Query settings
setQuerySettings: allows specifying indexes or rejecting specific query shapes.
explain() enhancement: adds queryPlanner.optimizationTimeMillis to display optimization time.
This provides more fine-grained control and insights into the query behavior. TencentDB for MongoDB supports more flexible traffic throttling policies. For details, see SQL Traffic Throttling.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan