Latest Pre-release in branch 5.2 (Rapid Release)
5.2.2-rc0
Released 09 Mar 2022
(4 years ago)
SoftwareMongoDB Server
Version5.2 (Rapid Release)
Status
End of life
Initial release5.2.0
13 Jan 2022
(4 years ago)
Latest release5.2.2-rc0
09 Mar 2022
(4 years ago)
End of life30 Nov 2021
(Ended 4 years, 6 months ago)
Release noteshttps://www.mongodb.com/docs/manual/release-notes/5.2/
Documentationhttps://www.mongodb.com/docs/v5.2/
Downloadhttps://www.mongodb.com/try/download/community
MongoDB Server 5.2 (Rapid Release) ReleasesView full list

What Is New in MongoDB 5.2

MongoDB 5.2 is a rapid release packed with refinements that enhance developer productivity and query performance. It builds upon the foundation of 5.0 with targeted improvements rather than a complete overhaul.

Category Key Updates
Aggregation New operators ($bottom, $firstN, $lastN, $linearFill, $locf), $unionWith enhancements
Time Series Columnar compression, sharding, delete operations, gap filling
Sharding Refinable shard keys, parallel internal operations
Security & Operators Audit log filtering, new dbCheck health diagnostic
Platform & Drivers Linux on ARM64 support, extended date range

How does MongoDB 5.2 improve aggregation pipelines?

The aggregation framework gets a significant boost with new operators for advanced window functions and data analysis. This allows for more complex time-series and analytical queries directly in the database.

New operators like $bottom, $firstN, and $lastN let you retrieve specific elements from a sorted list within a window. For handling missing data in sequences, $linearFill and $locf (last observation carried forward) are invaluable. The $unionWith stage now also supports a pipeline option, giving you more power to process data from multiple collections before merging it.

What time series enhancements are in this release?

Time series collections graduate from preview to full production readiness with critical new features. They are now shardable, making them viable for massive-scale IoT and telemetry workloads.

Columnar compression is now enabled by default, significantly reducing storage footprint. You can also perform delete operations on time series data, a frequently requested feature for managing data retention. The new gap-filling operators in the aggregation framework pair perfectly with these collections for smoother data analysis.

Can I change my shard key after deployment?

Yes, refinable shard keys let you modify your sharding strategy without a complex and costly migration. This is a major operational win for applications that evolve over time.

You can add new suffix fields to an existing hashed shard key, providing more granularity for data distribution. The balancer also gets smarter with the ability to perform certain internal operations in parallel, which can help speed up chunk migrations and improve overall cluster efficiency.

Are there new tools for database health and security?

Absolutely. The new dbCheck health monitoring command runs in the background to continuously verify data consistency across replicas, helping to catch issues early.

For security, you can now filter audit log output by users or roles. This simplifies compliance auditing by reducing noise and focusing on specific actors. These features provide better visibility and control for operators managing large deployments.

What platform support changes should I know about?

MongoDB 5.2 expands its platform support, most notably with official production support for Linux on ARM64 architectures. This is crucial for modern cloud and edge computing environments.

The supported date range has also been extended to include years before 1900. This is a niche but critical fix for applications dealing with historical data, preventing previous errors when handling early dates.

FAQ

Is the new time series delete operation a full CRUD delete?
No. The delete capability for time series collections (deleteMany()) is designed for bulk data management and retention policies. It does not support the same granular, single-document CRUD operations as regular collections.

When would I use the new $bottom aggregation operator?
Use $bottom when you need to retrieve the last document in a sorted group according to a specified sort order. It's the inverse of $top and is useful for analyzing worst-performing items or end-of-range values.

Does refinable shard key allow me to change the entire key?
No. You cannot change the entire key. You can only add new fields to the suffix of an existing hashed shard key. This provides more distribution control but doesn't allow a full rewrite of the sharding strategy.

How does the new columnar compression affect query performance?
It generally improves performance for analytical queries that scan large ranges of data. By storing data in a columnar format, the database can read and decompress only the necessary fields, reducing I/O. Operational workloads might not see a significant change.

Is dbCheck a replacement for the older repairDatabase command?
No, they serve different purposes. dbCheck is a non-invasive, continuous consistency checker that runs online. repairDatabase is an offline command that physically repairs storage files. Think of dbCheck as a monitoring tool and repairDatabase as a recovery tool.

Releases In Branch 5.2 (Rapid Release)

VersionRelease date
5.2.2-rc009 Mar 2022
(4 years ago)
5.2.1-rc011 Feb 2022
(4 years ago)
5.2.111 Feb 2022
(4 years ago)
5.2.013 Jan 2022
(4 years ago)
5.2.0-rc611 Jan 2022
(4 years ago)
5.2.0-rc511 Jan 2022
(4 years ago)
5.2.0-rc404 Jan 2022
(4 years ago)
5.2.0-rc324 Dec 2021
(4 years ago)
5.2.0-rc221 Dec 2021
(4 years ago)
5.2.0-rc113 Dec 2021
(4 years ago)
5.2.0-rc007 Dec 2021
(4 years ago)
5.2.0-alpha20 Oct 2021
(4 years ago)