Blog
IntermediateReferenceDeployments and Upgrades

MongoDB upgrades and patch releases

Rolling upgrade order for replica sets and sharded clusters, the featureCompatibilityVersion gate that separates binary upgrade from feature upgrade, the no-skipping rules, and how Atlas handles upgrades and end of life.

Applies to
MongoDB9.09.0.8 is the current patch release; from 9.0, self-managed deployments get the major plus an annual x.5 Feature Update release rather than a stream of minors
matureUpdated Reviewed

MongoDB numbers versions X.Y.Z: major releases may change on-disk formats, minor releases add features between majors, and patch releases are backward-compatible fixes within their series. A patch upgrade is the binary-replace rolling sequence below; a major upgrade adds the FCV step and the path rules.

The featureCompatibilityVersion gate

Binaries and features upgrade separately. A cluster running 9.0 binaries keeps operating at the earlier FCV until setFeatureCompatibilityVersion raises it - deliberately, because while FCV stays down, a downgrade back remains possible. Raising FCV is the point of no return: once features persisting the new format are enabled, downgrade is not possible (on Atlas, FCV advances automatically with Auto Upgrades and downgrade is not possible at all). Check the state before and after each step:

db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )

Every member must report the target version before binaries move on. The upgrade doc’s warning is specific: if a previous FCV upgrade did not complete, restarting on a higher binary can crash the node.

Patch release: the rolling order

For a 9.0 replica set, plan the work in a maintenance window and confirm every member is running first (an upgrade will not complete until all members are started):

  1. Upgrade each secondary one at a time - package-manager install is preferred over binary replacement - and wait for it to return to SECONDARY (a brief STARTUP2 or RECOVERING is normal) via rs.status() before touching the next.
  2. Step down the primary with rs.stepDown() rather than shutting it down - stepping down speeds the failover; the write gap is typically 10-20 seconds.
  3. Upgrade the former primary once another member holds PRIMARY.

For a sharded cluster: disable the balancer, upgrade the config server replica set with the same sequence, upgrade each shard (replica-set order for replica-set shards), upgrade mongos instances, then re-enable the balancer.

Major upgrades: no skipping

Each major upgrade must land on the immediately following major series - there is no 7.0 to 9.0. MongoDB documents that before 9.0 minor releases also could not be skipped within a series; from 9.0 onward the minor model changes - self-managed Enterprise Advanced and Community deployments get the major plus an annual x.5 Feature Update release carrying the same support window, rather than a sequence of minors to hop. Between minors pre-9.0 the documented move is sequential upgrades, or downgrade to the previous major then upgrade - every step requiring both the binary and the FCV move. Atlas users should also read the 9.0 compatibility notes before moving: at FCV 9.0, listIndexes reports collation: { locale: "simple" } on simple-collation indexes (SERVER-89953), which makes ODMs such as Mongoose treat unchanged indexes as different - Mongoose syncIndexes() drops and rebuilds them. Fixed in Mongoose 9.10.4 and 8.24.5; the workaround is createIndexes() or explicit deployment-time index management.

Atlas

Atlas delivers upgrades two ways. Manual Upgrades let you choose the target major; Auto Upgrades (“Latest Version With Auto Upgrades”) put the cluster on new releases automatically - including minors, which on Atlas are only delivered through Auto Upgrades - with maintenance waves controlling the order across environments, and Atlas advancing FCV itself. Free and Flex clusters are pinned to a major version and cannot be downgraded. At end of life MongoDB emails at least six months out, stops new deployments on the version a few months later, and then automatically upgrades remaining clusters to the current default target - which is explicitly not always the next major - inside the maintenance window if one is configured. On the self-managed side the whole decision is the operator’s; each major version is supported for five years plus optional two-year Extended Lifecycle Support on Enterprise Advanced.

What breaks, and how to see it

Failure mode Diagnostic
FCV left mid-upgrade getParameter shows differing versions across members; a restart on the higher binary can crash the node
Write gap during primary stepdown longer than expected rs.status() shows no PRIMARY; an election is in progress or a member is unreachable
Balancer left disabled after a sharded upgrade Chunks stop migrating; re-enable it - the sequence ends with the balancer back on
Mongoose drops and rebuilds indexes at FCV 9.0 syncIndexes() deletes live indexes - the SERVER-89953 simple-collation metadata change; upgrade Mongoose or stop calling syncIndexes at boot
Upgrade stalls partway A stopped member blocks completion; the docs require all members running before starting

Trade-offs in the rolling model

The rolling path buys near-zero downtime at the cost of running mixed binaries briefly and carrying the FCV two-step state. Its real constraint is the sequential-major rule: an estate two majors behind pays the full rolling sequence twice. The alternative for a large step is a mongosync-based blue/green - a second cluster continuously synced and cut over once - which is also the only route when the target hardware or topology changes at the same time.

MongoDB release support

4 supported
ReleaseLatestReleased
9.09.0.8Sept 2026
8.38.3.17May 2026
8.08.0.38Oct 2024
7.07.0.48Aug 2023

Data as of 2026-11-21 from endoflife.date. Refresh with node scripts/fetch-versions.mjs.