Docs Menu

Docs HomeDevelop ApplicationsMongoDB Manual

Release Notes for MongoDB 5.2

On this page

  • Patch Releases
  • Aggregation
  • Time Series Collections
  • Sharding
  • General Improvements
  • Replica Sets
  • Report an Issue

Important

MongoDB 5.2 is a rapid release and is only supported for MongoDB Atlas. MongoDB 5.2 is not supported for use on-premises. For more information, see MongoDB Versioning.

Issues fixed:

  • SERVER-63145 Query $densify produces incorrect results with optimizations enabled

  • SERVER-62981 Make SBE multi-planner's trial period termination condition independent of collection size

  • SERVER-62277 Performance regression from dbstats due to occupied disk space calculation

  • SERVER-62065 Upgrade path from 3.6 to 4.0 can leave chunk entries without history on the shards

  • SERVER-59754 Incorrect logging of queryHash/planCacheKey for operations that share the same $lookup shape

  • All JIRA issues closed in 5.2.1

  • 5.2.1 Changelog

The rest of this page provides the 5.2.0 release notes:

MongoDB 5.2 introduces the following aggregation operators:

Operator
Description
Returns the bottom element within a group according to the specified sort order.
Returns an aggregation of the bottom n elements within a group, according to the specified sort order.
Returns an aggregation of the first n elements within a group. Distinct from the $firstN array operator.
Returns a specified number of elements from the beginning of an array. Distinct from the $firstN accumulator.
Returns an aggregation of the last n elements within a group. Distinct from the $lastN array operator.
Returns a specified number of elements from the end of an array. Distinct from the $lastN accumulator.

Last observation carried forward. Sets values for null and missing fields in a window to the last non-null value for the field.

Returns an aggregation of the n maximum valued elements within a group. Distinct from the $maxN array operator.
Returns the n largest values in an array. Distinct from the $maxN accumulator.
Returns an aggregation of the n minimum valued elements within a group. Distinct from the $minN array operator.
Returns the n smallest values in an array. Distinct from the $minN accumulator.
Returns the top element within a group according to the specified sort order. Distinct from the command top.
Returns an aggregation of the top n elements within a group, according to the specified sort order.
Sorts an array based on its elements.

Starting in MongoDB 5.2, the $filter operator includes the optional limit field. The limit field restricts the number of matching array elements that the $filter operator returns.

Starting in MongoDB 5.2, you can convert timestamps to dates using the $convert operator. The $toDate operator can also convert timestamps.

Starting in MongoDB 5.2 and 5.0.6, aggregation operator metrics are more precise: internal processing does not inflate the counters.

Starting in version 5.2, MongoDB uses the slot-based execution query engine to execute $group stages if either:

  • $group is the first stage in the pipeline.

  • All preceding stages in the pipeline can also be executed by the slot-based execution engine.

For more information, see $group Optimization.

Starting in MongoDB 5.2, time series collections use column compression. Column compression adds a number of innovations that work together to significantly improve practical compression, reduce your data's overall storage on disk, and improve read performance.

See time series collection behavior.

Starting in MongoDB 5.2, you can run sharding administration commands (such as moveChunk) on the system.buckets collection.

Starting in MongoDB 5.2, the time that a mongos was started is included in the:

Starting in MongoDB 5.2, the default chunk size is 128 megabytes. In earlier versions of MongoDB, the default chunk size is 64 megabytes.

Starting in MongoDB 5.2, the setAllowMigrations command:

Starting in MongoDB 5.2 (and 5.0.4, 5.1.0)

The metadataRefreshInTransactionMaxWaitBehindCritSecMS parameter limits the time a shard waits for a critical section within a transaction.

Starting in MongoDB 5.2, you can use the following new server parameters to configure the refresh interval for cached LDAP user information:

Starting in MongoDB 5.2, the update interval for cached user information retrieved from an LDAP server depends on ldapShouldRefreshUserCacheEntries:

Starting in MongoDB 5.2, you can omit customData from the response of the:

To omit custom data from command output, specify the showCustomData: false option.

Starting in MongoDB 5.2, the initialSyncMethod determines whether initial sync is a logical initial sync or a file copy based initial sync.

initialSyncMethod is only available in MongoDB Enterprise Server.

To report an issue, see https://github.com/mongodb/mongo/wiki/Submit-Bug-Reports for instructions on how to file a JIRA ticket for the MongoDB server or one of the related projects.

What is MongoDB? →