Compatibility Changes in MongoDB 6.1
On this page
Important
MongoDB 6.1 is a rapid release and is only supported for MongoDB Atlas. MongoDB 6.1 is not supported for use on-premises. For more information, see MongoDB Versioning.
This page describes changes introduced in MongoDB 6.1 that can affect compatibility with older versions of MongoDB.
Aggregation
The following changes to aggregation can affect compatibility with older versions of MongoDB.
$add
Floating Point Rounding Errors
Starting in MongoDB 6.1, when an $add
expression receives
an input list with multiple floating point values, MongoDB may return
slightly different results compared to previous versions.
The $add
expression no longer accounts for floating-point rounding
errors. As a result, $add
behaves like addition in most programming
languages.
For example, the following $add
expression returns a different
result when run on MongoDB 6.1 compared to older versions:
db.test.aggregate( [ { $project: { sumOfValues: { $add: [ 0.1, 0.2, 0.3 ] } } } ] )
MongoDB 6.1 and later output:
[ { _id: ObjectId("6390f8085425651d8d0ef0a7"), sumOfValues: 0.6000000000000001 } ]
MongoDB 6.0 and earlier output:
[ { _id: ObjectId("6390f8085425651d8d0ef0a7"), sumOfValues: 0.6 } ]
Removed Options
Starting in MongoDB 6.1, journaling is always enabled. As a result, MongoDB
removes the storage.journal.enabled
option and the corresponding
--journal
and --nojournal
command-line options.
Starting in MongoDB 6.1, SNMP is removed.
All related command line options prevent mongod
from starting.
To monitor your deployment, use MongoDB Ops Manager.
Time Series Collections
Views Not Permitted on Bucket Collection Namespace
You cannot create a view from a time
series bucket collection namespace
(namely, a collection prefixed with system.buckets
).
If you are upgrading to MongoDB 6.1 from a prior version, you must drop
all views which are created on system.buckets
collections.
Server Parameters
Starting in MongoDB 6.1, the default value for
coordinateCommitReturnImmediatelyAfterPersistingDecision
is
false
.
No Automatic Chunk Splitting
Starting in MongoDB 6.1, automatic chunk splitting is not performed. This is because of balancing policy improvements. Auto-splitting commands still exist, but do not perform an operation. For details, see Balancing Policy Changes.
Starting in MongoDB 6.1, the following auto-splitting commands do not perform an operation:
Sharding Metrics Changes
currentOp.opStatus
is removed from the resharding metrics in MongoDB
6.1. For a list of new metrics that replace the reporting
currentOp.opStatus
provided, see the release notes.