Docs Menu

Docs HomeMongoDB Manual

Compatibility Changes in MongoDB 6.2

On this page

  • Removed Options
  • Sharded Clusters

Important

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

To install the latest MongoDB version supported for on-premises use, MongoDB 7.0, see the MongoDB 7.0 installation instructions.

This page describes changes introduced in MongoDB 6.2 that can affect compatibility with older versions of MongoDB.

Starting in version 6.2, MongoDB removes the maxSize field from the addShard command. As a result:

  • Running addShard with the maxSize field returns an InvalidOptions error.

  • New documents in the shards collection no longer include the maxSize field.

  • Any pre-existing maxSize field entries are ignored.

Starting in MongoDB 6.2, you must set value between 1 and 1024 (inclusive) when inserting or updating documents with the _id: chunksize field in the config.settings collection. If you specify an invalid value, MongoDB returns a schema validation error.

Any value fields outside the range of 1 to 1024 MB (inclusive) set prior to MongoDB 6.2 remain unchanged.

What is MongoDB? →