What's New in MongoDB 7.0
MongoDB 7.0 focuses on faster queries, smarter sharding management, stronger time series support, and improved security. The slot-based execution engine speeds up find and aggregation workloads. Sharding gains automatic chunk merging, better shard key analysis, and metadata checks. Time series collections remove many delete restrictions and add automatic indexing. Queryable Encryption reaches general availability for equality searches. New aggregation operators help with statistics, and OpenID Connect brings modern authentication. Overall, this release delivers noticeable performance lifts, easier cluster operations, and tools that make large-scale deployments more efficient and secure without major rewrites for most applications.
Key Features and Improvements
| Category | Feature / Improvement | Description |
|---|---|---|
| Performance | Slot-based Query Execution Engine (SBE) | Boosts find and aggregation performance; shown in slow query logs as queryFramework: "sbe". |
| Performance | Concurrent Transaction Tuning | Automatically adjusts read/write tickets during high load to maintain throughput. |
| Sharding | AutoMerger | Merges eligible chunks automatically; enabled by default; control with enableAutoMerger in configureCollectionBalancing. |
| Sharding | analyzeShardKey | Command and method to evaluate shard key effectiveness with metrics like sample size and correlation thresholds. |
| Sharding | checkMetadataConsistency | Verifies sharding metadata consistency at cluster, database, or collection level. |
| Sharding | mergeAllChunksOnShard | Merges all mergeable chunks on a specific shard for a collection. |
| Sharding | configureQueryAnalyzer | Sets up query sampling for collections to collect usage data. |
| Query Engine | Compound Wildcard Indexes | Supports one wildcard plus other fields for targeted queries while reducing index count. |
| Query Engine | USER_ROLES System Variable | Returns current user's roles in queries like find, aggregation, and updates. |
| Aggregation | $median and $percentile | Approximate median as scalar; array of percentile values as accumulator or expression. |
| Aggregation | $dateToString Enhancements | New %b (abbreviated month) and %B (full month name) format options. |
| Aggregation | $changeStreamSplitLargeEvent | Splits change stream events over 16 MB into fragments. |
| Time Series | Delete Operation Support | Removes most prior limits on deletes in time series collections. |
| Time Series | Automatic Compound Index | Created on metaField + timeField when making a time series collection. |
| Security | Queryable Encryption GA | Equality queries now production-ready (incompatible with preview version). |
| Security | OpenID Connect Authentication | Enterprise support for SSO via third-party providers using oidcIdentityProviders. |
| Security | KMIP Legacy Protocol | Supports versions 1.0/1.1 with useLegacyProtocol setting. |
| Atlas Search | Search Index Management | Commands and mongosh helpers like createSearchIndexes, dropSearchIndex (Atlas only). |
Deprecations and Removals
| Item | Status | Details |
|---|---|---|
| collStats and currentOp commands | Deprecated | Use $collStats and $currentOp aggregation stages instead. |
| Journaling options | Removed | Journaling always on; storage.journal.enabled and --journal/--nojournal flags gone. |
| maxSize in addShard | Removed | Field ignored or causes error; balancer now uses data size, not chunk count. |
| Platform support | Removed | RHEL 7 / CentOS 7 / Oracle 7 on PPC64LE and s390x no longer supported. |
Compatibility and Upgrade Notes
To upgrade to MongoDB 7.0, first set featureCompatibilityVersion to 6.0 on your current setup. Use setFeatureCompatibilityVersion with confirm: true. Only single-version downgrades work -- binary downgrades are not supported in Community Edition. Queryable Encryption GA data prevents downgrade to preview versions. Remove any use of deprecated commands and options like old journaling flags. Sharding balancer shifts to size-based distribution, so review chunk/ranges behavior. Test thoroughly after upgrade, especially sharding metadata, time series deletes, and query performance with SBE. Patch releases address important security fixes and bugs, so stay current within the 7.0 series.