Revisions provide security patches, bug fixes, and new or changed
features that do not contain any backward breaking changes. Always
upgrade to the latest revision in your release series. The third number
in the MongoDB version number indicates
the revision.

When upgrading from MongoDB 4.0.6 or earlier to MongoDB 4.0.7 or later,
a client may try to resume change streams using the new v1 resume
token when connected to a member that has not been updated (i.e. only
accepts v0 or BinData token) and fail. In such cases, the client
must wait for the upgrade to complete before resuming change streams.

Starting in MongoDB 3.6, MongoDB enables support for
"majority" read concern by default.

For MongoDB 3.6.1+ and 4.0.3+, you can disable read concern
"majority" to prevent the storage cache pressure from
immobilizing a deployment with a primary-secondary-arbiter (PSA)
architecture. Disabling "majority" read concern also
disables support for Change Streams

Before you upgrade a production environment, use the procedures in this
document to upgrade a staging environment that reproduces your
production environment, to ensure that your production configuration is
compatible with all changes.

This section describes how to upgrade MongoDB by replacing the existing
binaries. The preferred approach to an upgrade is to use the operating
system’s package management tool and the official MongoDB packages, as
described in Install MongoDB.

To upgrade a mongod or mongos instance by
replacing the existing binaries:

Download the binaries for the latest MongoDB revision from the
MongoDB Download Page and store the binaries in a temporary
location. The binaries download as compressed files that uncompress
to the directory structure used by the MongoDB installation.

When upgrading from MongoDB 4.0.0-4.0.6 to MongoDB 4.0.7 or later,
a client may try to resume change streams using the new v1
resume token when connected to a member that has not been updated
(i.e. only accepts v0 token or BinData) and fail. In such cases, the
client must wait for the upgrade to complete before resuming change
streams.

When upgrading from MongoDB 4.0.6 or earlier to 4.0.7 or later, the
members of the sharded clusters will continue to produce v0 or
BinData resume tokens until the mongos instance(s)
are updated. Upgraded mongos instances will begin
producing v1 change stream resume tokens. These tokens cannot be
used to resume a stream on a mongos that has not yet
been upgraded to 4.0.7 or later.