> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

# Release Notes for MongoDB 8.2

**Warning: MongoDB Is Incompatible with Linux Kernel 6.19 Through 7.0.13**

Due to an incompatibility between certain Linux kernel releases and the currently vendored version of TCMalloc, running MongoDB with a Linux kernel version from 6.19 through 7.0.13 can cause MongoDB to crash. To prevent this crash, MongoDB detects these kernel versions and stops during startup. This incompatibility affects all MongoDB packages, including those obtained from the MongoDB website, a package manager, or Docker.

Linux kernel version 7.0.14 and later resolves this incompatibility. To run MongoDB on an affected system, upgrade to Linux kernel version 7.0.14 or later.

MongoDB 8.2 is a minor Release, which means that it is supported for both MongoDB Atlas and on-premises deployments. MongoDB 8.2 introduces incremental improvements within a Major version release cycle. MongoDB 8.2 also includes changes introduced in MongoDB 8.1. This page describes changes introduced in the minor release and MongoDB 8.2.

For general guidance on MongoDB version numbering, release types, and upgrade paths, see [MongoDB Versions and Upgrade Paths.](https://www.mongodb.com/docs/mongodb-versions.md#std-label-versions-and-upgrade-paths)

To learn more about the differences between Major and minor releases, see [MongoDB Versioning.](https://www.mongodb.com/docs/manual/reference/versioning.md#std-label-release-version-numbers)

**Important:**

`mongosync` is not supported in MongoDB 9.0.

## Patch Releases

### 8.2.12 - July 22, 2026

This release contains important security and reliability improvements.

**Important:**

MongoDB 8.2.12 contains fixes for:

- [CVE-2026-9737](https://www.cve.org/CVERecord?id=CVE-2026-9737)

- [CVE-2026-13055](https://www.cve.org/CVERecord?id=CVE-2026-13055)

- [CVE-2026-13057](https://www.cve.org/CVERecord?id=CVE-2026-13057)

- [CVE-2026-13058](https://www.cve.org/CVERecord?id=CVE-2026-13058)

- [CVE-2026-13059](https://www.cve.org/CVERecord?id=CVE-2026-13059)

- [CVE-2026-13060](https://www.cve.org/CVERecord?id=CVE-2026-13060)

- [CVE-2026-13062](https://www.cve.org/CVERecord?id=CVE-2026-13062)

- [CVE-2026-13063](https://www.cve.org/CVERecord?id=CVE-2026-13063)

- [CVE-2026-13064](https://www.cve.org/CVERecord?id=CVE-2026-13064)

- [CVE-2026-13065](https://www.cve.org/CVERecord?id=CVE-2026-13065)

- [CVE-2026-13066](https://www.cve.org/CVERecord?id=CVE-2026-13066)

- [CVE-2026-13068](https://www.cve.org/CVERecord?id=CVE-2026-13068)

- [CVE-2026-13069](https://www.cve.org/CVERecord?id=CVE-2026-13069)

- [CVE-2026-13070](https://www.cve.org/CVERecord?id=CVE-2026-13070)

- [CVE-2026-13071](https://www.cve.org/CVERecord?id=CVE-2026-13071)

- [CVE-2026-13072](https://www.cve.org/CVERecord?id=CVE-2026-13072)

- [CVE-2026-13074](https://www.cve.org/CVERecord?id=CVE-2026-13074)

- [CVE-2026-13075](https://www.cve.org/CVERecord?id=CVE-2026-13075)

- [CVE-2026-13077](https://www.cve.org/CVERecord?id=CVE-2026-13077)

- [CVE-2026-13078](https://www.cve.org/CVERecord?id=CVE-2026-13078)

For the latest information about MongoDB security updates, see [MongoDB Security Bulletins](https://www.mongodb.com/resources/products/alerts?tck=docs).

Issues fixed:

- [SERVER-123081](https://jira.mongodb.org/browse/SERVER-123081) Handle compound wildcard index spec in `$_internalIndexKey`

- [SERVER-125872](https://jira.mongodb.org/browse/SERVER-125872) Fix exponential hashing of query solutions for `InternalSchema*MatchExpression` nodes

- [SERVER-126247](https://jira.mongodb.org/browse/SERVER-126247) Properly validate `$search.mergingPipeline` as an internal-only field

- [SERVER-127280](https://jira.mongodb.org/browse/SERVER-127280) Reject expression-based `sortBy` in the `$linearFill` parser

- [SERVER-127357](https://jira.mongodb.org/browse/SERVER-127357) Check for duplicate `from` fields in `DocumentSourceGraphLookup::createFromBson()`

- [SERVER-127566](https://jira.mongodb.org/browse/SERVER-127566) Limit the contention factor that can be used for FLE2 fields

- [SERVER-127661](https://jira.mongodb.org/browse/SERVER-127661) Require `autocommit` when `startOrContinueTransaction` is specified

- [SERVER-127694](https://jira.mongodb.org/browse/SERVER-127694) Add type checking for `DBPointer`

- [SERVER-127737](https://jira.mongodb.org/browse/SERVER-127737) Limit the number of metadata blocks allowed in a `FLE2IndexedTextEncryptedValue`

- [SERVER-127831](https://jira.mongodb.org/browse/SERVER-127831) Forbid external users from running FLE2 commands with `crudProcessed` set to true

- [SERVER-128198](https://jira.mongodb.org/browse/SERVER-128198) Fix `mongos` `killCursors` to check authorization against the cursor's namespace instead of the request namespace

- [SERVER-128316](https://jira.mongodb.org/browse/SERVER-128316) Bound the maximum typo suggestion in hybrid search

- [SERVER-128341](https://jira.mongodb.org/browse/SERVER-128341) Fix a server crash caused by sorting on a `$meta` expression

- [SERVER-129103](https://jira.mongodb.org/browse/SERVER-129103) Restrict target BinData subtypes in $convert and $constant/$literal

- [SERVER-128362](https://jira.mongodb.org/browse/SERVER-128362) Add a null check on the return value in `ocspClientCallback`

- [SERVER-128433](https://jira.mongodb.org/browse/SERVER-128433) Prevent external clients from setting `runtimeConstants.userRoles`

- [SERVER-128473](https://jira.mongodb.org/browse/SERVER-128473) Fix a use-after-free in `$function` caused by a missing `advanceGeneration()` call on retained BSON arguments

- [SERVER-128494](https://jira.mongodb.org/browse/SERVER-128494) Validate external BSON in `MultiBsonStreamCursor`

- [SERVER-128517](https://jira.mongodb.org/browse/SERVER-128517) Add a configurable minimum timeout for pre-auth streamable `hello` to prevent a hot loop from very small `maxAwaitTimeMS` values

- [SERVER-128832](https://jira.mongodb.org/browse/SERVER-128832) Guard `ImplScope` `ModuleLoader` creation

- [SERVER-127346](https://jira.mongodb.org/browse/SERVER-127346) Make session refresh have kExempt admission priority

- [All JIRA issues closed in 8.2.12](https://jira.mongodb.org/issues/?jql=project%20in%20\(SERVER%2CTOOLS%2CWT\)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%278.2.12%27)

- [8.2.12 Changelog](https://www.mongodb.com/docs/manual/release-notes/8.2-changelog.md#std-label-8.2.12-changelog)

### 8.2.11 - June 11, 2026

**Important:**

MongoDB 8.2.11 contains a fix for [CVE-2026-11933](https://www.cve.org/CVERecord?id=CVE-2026-11933)

For the latest information about MongoDB security updates, see [MongoDB Security Bulletins](https://www.mongodb.com/resources/products/alerts?tck=docs).

Issues fixed:

- [SERVER-128125](https://jira.mongodb.org/browse/SERVER-128125) Align bsonObjToArray ownership semantics with bsonGetImmutable

- [All JIRA issues closed in 8.2.11](https://jira.mongodb.org/issues/?jql=project%20in%20\(SERVER%2CTOOLS%2CWT\)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%278.2.11%27)

- [8.2.11 Changelog](https://www.mongodb.com/docs/manual/release-notes/8.2-changelog.md#std-label-8.2.11-changelog)

### 8.2.10 - June 9, 2026

**Important:**

MongoDB 8.2.10 contains a fix for:

- [CVE-2026-9740](https://www.cve.org/CVERecord?id=CVE-2026-9740)

- [CVE-2026-9741](https://www.cve.org/CVERecord?id=CVE-2026-9741)

- [CVE-2026-9742](https://www.cve.org/CVERecord?id=CVE-2026-9742)

- [CVE-2026-9746](https://www.cve.org/CVERecord?id=CVE-2026-9746)

- [CVE-2026-9747](https://www.cve.org/CVERecord?id=CVE-2026-9747)

- [CVE-2026-9748](https://www.cve.org/CVERecord?id=CVE-2026-9748)

- [CVE-2026-9749](https://www.cve.org/CVERecord?id=CVE-2026-9749)

- [CVE-2026-9750](https://www.cve.org/CVERecord?id=CVE-2026-9750)

- [CVE-2026-9751](https://www.cve.org/CVERecord?id=CVE-2026-9751)

- [CVE-2026-9752](https://www.cve.org/CVERecord?id=CVE-2026-9752)

- [CVE-2026-9753](https://www.cve.org/CVERecord?id=CVE-2026-9753)

- [CVE-2026-9754](https://www.cve.org/CVERecord?id=CVE-2026-9754)

For the latest information about MongoDB security updates, see [MongoDB Security Bulletins](https://www.mongodb.com/resources/products/alerts?tck=docs).

Issues fixed:

- [SERVER-125063](https://jira.mongodb.org/browse/SERVER-125063) Prohibit nesting of BSONColumn inside BSONColumn

- [SERVER-123507](https://jira.mongodb.org/browse/SERVER-123507) Encrypted predicates inside a `$vectorSearch` prefilter should get replaced with encryption placeholders

- [SERVER-124183](https://jira.mongodb.org/browse/SERVER-124183) Limit scope of authenticate

- [SERVER-124190](https://jira.mongodb.org/browse/SERVER-124190) Forbid aggregate `exchange` field from non-internal clients

- [SERVER-123918](https://jira.mongodb.org/browse/SERVER-123918) Validate `runtimeConstants.userRoles` in IDL

- [SERVER-123951](https://jira.mongodb.org/browse/SERVER-123951) `$_internalConvertBucketIndexStats` should not return PauseExecution on failed index conversion

- [SERVER-124031](https://jira.mongodb.org/browse/SERVER-124031) Ensure `Exchange::getTargetConsumer` correctly handles MaxKey

- [SERVER-123633](https://jira.mongodb.org/browse/SERVER-123633) Fix handling of user $-prefixed fields colliding with internal metadata

- [SERVER-123370](https://jira.mongodb.org/browse/SERVER-123370) LDAP query password is logged when set through setParameter

- [SERVER-123440](https://jira.mongodb.org/browse/SERVER-123440) GeometryCollection with strict-winding polygon causes 2dsphere index key generation crash

- [SERVER-124959](https://jira.mongodb.org/browse/SERVER-124959) Validate doc diff array bounds and `$_internalApplyOplogUpdate` BSON

- [SERVER-122207](https://jira.mongodb.org/browse/SERVER-122207) Better error reporting for MD5 failures

- [8.2.10 Changelog](https://www.mongodb.com/docs/manual/release-notes/8.2-changelog.md#std-label-8.2.10-changelog)

### 8.2.9 - May 12, 2026

**Important:**

MongoDB 8.2.9 contains a fix for:

- [CVE-2026-8053](https://www.cve.org/CVERecord?id=CVE-2026-8053)

- [CVE-2026-8199](https://www.cve.org/CVERecord?id=CVE-2026-8199)

- [CVE-2026-8200](https://www.cve.org/CVERecord?id=CVE-2026-8200)

- [CVE-2026-8201](https://www.cve.org/CVERecord?id=CVE-2026-8201)

- [CVE-2026-8202](https://www.cve.org/CVERecord?id=CVE-2026-8202)

- [CVE-2026-8336](https://www.cve.org/CVERecord?id=CVE-2026-8336)

For the latest information about MongoDB security updates, see [MongoDB Security Bulletins](https://www.mongodb.com/resources/products/alerts?tck=docs).

Issues fixed:

- [SERVER-120668](https://jira.mongodb.org/browse/SERVER-120668) Disallow `$trim` with too large mask string

- [SERVER-121610](https://jira.mongodb.org/browse/SERVER-121610) Ensure cached `emit()` calls are no-op

- [SERVER-121895](https://jira.mongodb.org/browse/SERVER-121895) Improve redaction of validation errors

- [SERVER-122032](https://jira.mongodb.org/browse/SERVER-122032) Calling `replaceEncryptedFieldsInFilter` with positional projection results in use-after-free

- [SERVER-122449](https://jira.mongodb.org/browse/SERVER-122449) Improve `$bitSet` match expressions

- [SERVER-126021](https://jira.mongodb.org/browse/SERVER-126021) Undefined behavior when inserting data with duplicate field names into timeseries collections

- [All JIRA issues closed in 8.2.9](https://jira.mongodb.org/issues/?jql=project%20in%20\(SERVER%2CTOOLS%2CWT\)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%278.2.9%27)

- [8.2.9 Changelog](https://www.mongodb.com/docs/manual/release-notes/8.2-changelog.md#std-label-8.2.9-changelog)

### 8.2.7 - Apr 16, 2026

**Important:**

MongoDB 8.2.7 contains a fix for:

- [CVE-2026-6914](https://www.cve.org/CVERecord?id=CVE-2026-6914)

- [CVE-2026-6915](https://www.cve.org/CVERecord?id=CVE-2026-6915)

For the latest information about MongoDB security updates, see [MongoDB Security Bulletins](https://www.mongodb.com/resources/products/alerts?tck=docs).

- [SERVER-103990](https://jira.mongodb.org/browse/SERVER-103990) Skip range deletions when transitioning from embedded to dedicated config servers

- [SERVER-112273](https://jira.mongodb.org/browse/SERVER-112273) Fix crash caused by killing an OplogWriter operation using `killOp()`

- [SERVER-116284](https://jira.mongodb.org/browse/SERVER-116284) Ensure MultiStatementTransactionRequestsSender sends `commitTransaction` to all shards before processing results

- [SERVER-119413](https://jira.mongodb.org/browse/SERVER-119413) Fix `configTerm` to handle `int64` values when `int32` is expected

- [SERVER-119964](https://jira.mongodb.org/browse/SERVER-119964) Collection catalog race condition shuts down oplog visibility thread after rollback

- [WT-16375](https://jira.mongodb.org/browse/WT-16375) Turn off failpoint when calling `cursor->close()`

- [All JIRA issues closed in 8.2.7](https://jira.mongodb.org/issues/?jql=project%20in%20\(SERVER%2CTOOLS%2CWT\)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%278.2.7%27)

- [8.2.7 Changelog](https://www.mongodb.com/docs/manual/release-notes/8.2-changelog.md#std-label-8.2.7-changelog)

### 8.2.6 - Mar 17, 2026

**Important:**

MongoDB 8.2.6 contains a fix for:

- [CVE-2026-4147](https://www.cve.org/CVERecord?id=CVE-2026-4147)

- [CVE-2026-4148](https://www.cve.org/CVERecord?id=CVE-2026-4148)

For the latest information about MongoDB security updates, see [MongoDB Security Bulletins](https://www.mongodb.com/resources/products/alerts?tck=docs).

- [SERVER-106239](https://jira.mongodb.org/browse/SERVER-106239): Investigate transaction participant state mismatch when running sharded aggregate with merging pipeline executing on a shard

- [SERVER-110832](https://jira.mongodb.org/browse/SERVER-110832): OplogWriter should not hold on to session through rollbacks

- [SERVER-111007](https://jira.mongodb.org/browse/SERVER-111007): Validation should distinguish between root causes when finding mixed schema data

- [SERVER-113319](https://jira.mongodb.org/browse/SERVER-113319): [`$match`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/match.md#mongodb-pipeline-pipe.-match) pushdown past a renamed field is done incorrectly when the expression root is a renamed field path expression

- [SERVER-115962](https://jira.mongodb.org/browse/SERVER-115962): Balancer does not make progress when the most loaded shard is already balanced within its zones

- [SERVER-117623](https://jira.mongodb.org/browse/SERVER-117623): Sharded multi-document transactions can observe partial effects of concurrent `renameCollection` operations

- [SERVER-118428](https://jira.mongodb.org/browse/SERVER-118428): `mongocryptd` rejects large messages

- [SERVER-119317](https://jira.mongodb.org/browse/SERVER-119317): Improve object lifecycle of MD5 hash state

- [SERVER-119319](https://jira.mongodb.org/browse/SERVER-119319): Fix ExpressionContext use-after-free bug

- [WT-15739](https://jira.mongodb.org/browse/WT-15739): Fix reconciliation leaking overflow pages

- [All JIRA issues closed in 8.2.6](https://jira.mongodb.org/issues/?jql=project%20in%20\(SERVER%2CTOOLS%2CWT\)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%278.2.6%27)

- [8.2.6 Changelog](https://www.mongodb.com/docs/manual/release-notes/8.2-changelog.md#std-label-8.2.6-changelog)

### 8.2.5 - Feb 10, 2026

- [SERVER-118711](https://jira.mongodb.org/browse/SERVER-118711) - Can not create timeseries 2dsphere index with a non-system user

- [All JIRA issues closed in 8.2.5](https://jira.mongodb.org/issues/?jql=project%20in%20\(SERVER%2CTOOLS%2CWT\)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%278.2.5%27)

- [8.2.5 Changelog](https://www.mongodb.com/docs/manual/release-notes/8.2-changelog.md#std-label-8.2.5-changelog)

### 8.2.4 - Jan 27, 2026

**Important:**

MongoDB 8.2.4 contains a fix for

- [CVE-2026-1848](https://www.cve.org/CVERecord?id=CVE-2026-1848)

- [CVE-2026-1850](https://www.cve.org/CVERecord?id=CVE-2026-1850)

- [CVE-2026-25609](https://www.cve.org/CVERecord?id=CVE-2026-25609)

- [CVE-2026-25611](https://www.cve.org/CVERecord?id=CVE-2026-25611)

- [CVE-2026-25612](https://www.cve.org/CVERecord?id=CVE-2026-25612)

- [CVE-2026-25613](https://www.cve.org/CVERecord?id=CVE-2026-25613)

For the latest information about MongoDB security updates, see [MongoDB Security Bulletins](https://www.mongodb.com/resources/products/alerts?tck=docs).

Issues Fixed:

- [SERVER-112952](https://jira.mongodb.org/browse/SERVER-112952) - tighten profile command auth check

- [SERVER-113685](https://jira.mongodb.org/browse/SERVER-113685) - Segfault for query on compound wildcard index

- [SERVER-114126](https://jira.mongodb.org/browse/SERVER-114126) - Reduce memory usage and add new guardrails to the boolean simplifier

- [SERVER-114695](https://jira.mongodb.org/browse/SERVER-114695) - Update default value for pending connections

- [SERVER-114838](https://jira.mongodb.org/browse/SERVER-114838) - Lock Manager is susceptible to an adversarial DDOS attack

- [SERVER-115296](https://jira.mongodb.org/browse/SERVER-115296) - Redact ResourceId raw values from error messages

- [SERVER-116206](https://jira.mongodb.org/browse/SERVER-116206) - Better exception handling for message compressors

- [SERVER-116210](https://jira.mongodb.org/browse/SERVER-116210) - Adjust the maximum buffer size for ingress requests

- [SERVER-116211](https://jira.mongodb.org/browse/SERVER-116211) - Cap memory allocated by network buffers

- [All JIRA issues closed in 8.2.4](https://jira.mongodb.org/issues/?jql=project%20in%20\(SERVER%2CTOOLS%2CWT\)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%278.2.4%27)

- [8.2.4 Changelog](https://www.mongodb.com/docs/manual/release-notes/8.2-changelog.md#std-label-8.2.4-changelog)

### 8.2.3 - Dec 19, 2025

**Important:**

MongoDB 8.2.3 contains a fix for [CVE-2025-14847](https://www.cve.org/CVERecord?id=CVE-2025-14847).

For the latest information about MongoDB security updates, see [MongoDB Security Bulletins](https://www.mongodb.com/resources/products/alerts?tck=docs).

Issues fixed:

- [SERVER-115508](https://jira.mongodb.org/browse/SERVER-115508): Make minimally sized buffers for uncompressed Messages

- [8.2.3 Changelog](https://www.mongodb.com/docs/manual/release-notes/8.2-changelog.md#std-label-8.2.3-changelog)

### 8.2.2 - Nov 19, 2025

**Important:**

MongoDB 8.2.2 includes fixes for [CVE-2025-12893](https://www.cve.org/CVERecord?id=CVE-2025-12893) and [CVE-2025-14345](https://www.cve.org/CVERecord?id=CVE-2025-14345).

For the latest information about MongoDB security updates, see [MongoDB Security Bulletins](https://www.mongodb.com/resources/products/alerts?tck=docs).

Issues fixed:

- [SERVER-103774](https://jira.mongodb.org/browse/SERVER-103774): Disallow usage of compound wildcard indexes as shard key indexes

- [SERVER-105047](https://jira.mongodb.org/browse/SERVER-105047): Queries using `$or` and `$ne` on sharded collections might include orphan documents

- [SERVER-110423](https://jira.mongodb.org/browse/SERVER-110423): `$group` can use a distinct scan on a sparse index, which excludes results with `null` or `missing` values

- [SERVER-110916](https://jira.mongodb.org/browse/SERVER-110916): Resolve a use-after-move issue in `targetShardsAndAddMergeCursors()`

- [SERVER-111486](https://jira.mongodb.org/browse/SERVER-111486): `$group` can still use a distinct scan on a sparse index if an alternative index is available

- [SERVER-112467](https://jira.mongodb.org/browse/SERVER-112467): Track and report the number of pending proxy connections

- [SERVER-112520](https://jira.mongodb.org/browse/SERVER-112520): Failure to write to a geo index when inserting a document into an existing timeseries bucket

- [All JIRA issues closed in 8.2.2](https://jira.mongodb.org/issues/?jql=project%20in%20\(SERVER%2CTOOLS%2CWT\)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%278.2.2%27)

- [8.2.2 Changelog](https://www.mongodb.com/docs/manual/release-notes/8.2-changelog.md#std-label-8.2.2-changelog)

### 8.2.1 - Oct 3, 2025

**Important:**

MongoDB 8.2.1 includes a fix for [CVE-2025-13507](https://www.cve.org/CVERecord?id=CVE-2025-13507).

For the latest information about MongoDB security updates, see [MongoDB Security Bulletins](https://www.mongodb.com/resources/products/alerts?tck=docs).

Issues fixed:

- [SERVER-94681](https://jira.mongodb.org/browse/SERVER-94681): Move sampling to the oplog cap maintainer thread

- [SERVER-106469](https://jira.mongodb.org/browse/SERVER-106469): Starting mongocryptd fails on latest build, windows.

- [SERVER-108565](https://jira.mongodb.org/browse/SERVER-108565): Improve handling of oversized writes to time series collections.

- [SERVER-109626](https://jira.mongodb.org/browse/SERVER-109626): Adjust behavior for emitting additional fields in change streams

- [SERVER-110250](https://jira.mongodb.org/browse/SERVER-110250): Use existing session when dropping spill WT ident

- [WT-15225](https://jira.mongodb.org/browse/WT-15225): Fix newly created table and drop() EBUSY issue

- [All JIRA issues closed in 8.2.1](https://jira.mongodb.org/issues/?jql=project%20in%20\(SERVER%2CTOOLS%2CWT\)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%278.2.1%27)

- [8.2.1 Changelog](https://www.mongodb.com/docs/manual/release-notes/8.2-changelog.md#std-label-8.2.1-changelog)

### 8.2.0 - September 17, 2026

**Important:**

MongoDB 8.2 includes fixes for [CVE-2025-13643](https://www.cve.org/CVERecord?id=CVE-2025-13643), [CVE-2025-13644](https://www.cve.org/CVERecord?id=CVE-2025-13644), and [CVE-2026-1847](https://www.cve.org/CVERecord?id=CVE-2026-1847).

For the latest information about MongoDB security updates, see [MongoDB Security Bulletins](https://www.mongodb.com/resources/products/alerts?tck=docs).

## Performance Improvements

MongoDB 8.2 introduces performance improvements from MongoDB 8.1, including:

- Faster initial sync.

- Faster time-series bulk insertions.

- Reduced query multi-planning costs.

**Note:**

The amount of performance improvement can vary depending on the configuration of your workloads and database instances.

## Index Generation

### Geospatial Index Generation

Starting in MongoDB 8.2, if a document contains both GeoJSON and legacy numeric coordinate fields, geospatial index generation prioritizes GeoJSON coordinates.

If your documents contain legacy numeric coordinate values that precede GeoJSON coordinates and existing indexes rely on that behavior, you might need to rebuild your geospatial indexes. Review geospatial queries to confirm they return expected results.

## Sharding

### terminateSecondaryReadsOnOrphanCleanup Parameter

MongoDB 8.2 adds the [`terminateSecondaryReadsOnOrphanCleanup`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.terminateSecondaryReadsOnOrphanCleanup) parameter, which controls whether long-running read operations on secondary nodes automatically terminate before [orphaned document](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-orphaned-document) deletion following a [chunk](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-chunk) migration.

By default, this parameter is set to `true`. If a read operation on a secondary node begins before the chunk migration commits, MongoDB automatically terminates the operation before deleting the orphaned documents. In MongoDB versions before 8.2, these operations continue executing after orphaned document deletion and may silently miss documents without returning an error.

To support this new behavior, the default value for [`orphanCleanupDelaySecs`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.orphanCleanupDelaySecs) is now `3600` (previously `900`).

## General Changes

### Index Builds During Initial Sync

Starting in MongoDB 8.2 (and 8.0.13, 7.0.26), index builds during [initial sync](https://www.mongodb.com/docs/manual/core/replica-set-sync.md#std-label-replica-set-initial-sync) use 10% of available RAM by default. You can specify a different percentage of memory for MongoDB to use with the [`initialSyncIndexBuildMemoryPercentage`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.initialSyncIndexBuildMemoryPercentage) parameter.

By default, the amount of available memory must be between 200 MB and 16 GB, inclusive. You use the following parameters to specify different minimum and maximum thresholds for memory usage:

- [`initialSyncIndexBuildMemoryMinMB`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.initialSyncIndexBuildMemoryMinMB)

- [`initialSyncIndexBuildMemoryMaxMB`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.initialSyncIndexBuildMemoryMaxMB)

### Query Statistics

Starting in MongoDB 8.2, the [`$queryStats`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/querystats.md#mongodb-pipeline-pipe.-queryStats) output includes the following metrics on delinquent [tickets:](https://www.mongodb.com/docs/manual/core/wiredtiger.md#std-label-storage-wiredtiger-concurrency)

- `metrics.delinquentAcquisitions`

- `metrics.totalAcquisitionDelinquencyMillis`

- `metrics.maxAcquisitionDelinquencyMillis`

MongoDB considers an execution ticket as delinquent when acquisition takes too long.

### WiredTiger Cache Size Configuration as a Percentage

Starting in MongoDB 8.2, you can configure the [WiredTiger](https://www.mongodb.com/docs/manual/core/wiredtiger.md#std-label-storage-wiredtiger) internal cache size using a new percentage-based option. In addition to the existing [`--wiredTigerCacheSizeGB`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#std-option-mongod.--wiredTigerCacheSizeGB) and [`storage.wiredTiger.engineConfig.cacheSizeGB`](https://www.mongodb.com/docs/manual/reference/configuration-options.md#mongodb-setting-storage.wiredTiger.engineConfig.cacheSizeGB) gigabyte-based settings, you can now specify the cache size as a percentage of the available memory with the [`--wiredTigerCacheSizePct`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#std-option-mongod.--wiredTigerCacheSizePct) and [`storage.wiredTiger.engineConfig.cacheSizePct`](https://www.mongodb.com/docs/manual/reference/configuration-options.md#mongodb-setting-storage.wiredTiger.engineConfig.cacheSizePct) options.

### New Inconsistency Type: Range Deletion Missing Shard Key Index

Starting in MongoDB 8.2, a new inconsistency type [`RangeDeletionMissingShardKeyIndex`](https://www.mongodb.com/docs/manual/reference/inconsistency-type/rangedeletionmissingshardkeyindex.md#mongodb-data-RangeDeletionMissingShardKeyIndex) is implemented. The inconsistency type indicates that a sharded collection exists that doesn't have an index compatible with the collection shard key and there is at least one remaining range deletion task to complete.

### New Aggregation Expression

Starting in MongoDB 8.2, you can use `$currentDate` with [`aggregate()`](https://www.mongodb.com/docs/manual/reference/method/db.collection.aggregate.md#mongodb-method-db.collection.aggregate) to return the current time on the server.

### New $currentOp Field

The [`$currentOp`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/currentop.md#mongodb-pipeline-pipe.-currentOp) aggregation stage now includes the [`versionContext`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/currentop.md#mongodb-data--currentOp.versionContext) field, which provides information on the [Feature Compatibility Version (FCV)](https://www.mongodb.com/docs/manual/reference/command/setfeaturecompatibilityversion.md#std-label-view-fcv) of the operation.

### serverStatus Output Change

[`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-dbcommand-dbcmd.serverStatus) includes the following new fields in its output:

- [`metrics.operation.killedDueToRangeDeletion`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.metrics.operation.killedDueToRangeDeletion)

- [`metrics.query.bucketAuto.spilledBytes`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.metrics.query.bucketAuto.spilledBytes)

- [`metrics.query.bucketAuto.spilledDataStorageSize`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.metrics.query.bucketAuto.spilledDataStorageSize)

- [`metrics.query.bucketAuto.spilledRecords`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.metrics.query.bucketAuto.spilledRecords)

- [`metrics.query.bucketAuto.spills`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.metrics.query.bucketAuto.spills)

- [`planCache.classic.replanned_plan_is_cached_plan`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.planCache.classic.replanned_plan_is_cached_plan)

- [`planCache.sbe.replanned_plan_is_cached_plan`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.planCache.sbe.replanned_plan_is_cached_plan)

- [`spillWiredTiger`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.spillWiredTiger)

- [`connections.queuedForEstablishment`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.connections.queuedForEstablishment)

- [`connections.establishmentRateLimit`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.connections.establishmentRateLimit)

- [`connections.establishmentRateLimit.rejected`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.connections.establishmentRateLimit.rejected)

- [`connections.establishmentRateLimit.exempted`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.connections.establishmentRateLimit.exempted)

- [`connections.establishmentRateLimit.interruptedDueToClientDisconnect`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.connections.establishmentRateLimit.interruptedDueToClientDisconnect)

- [`metrics.network.averageTimeToCompletedTLSHandshakeMicros`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.metrics.network.averageTimeToCompletedTLSHandshakeMicros)

- [`metrics.network.averageTimeToCompletedHelloMicros`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.metrics.network.averageTimeToCompletedHelloMicros)

- [`metrics.network.averageTimeToCompletedAuthMicros`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.metrics.network.averageTimeToCompletedAuthMicros)

- [`queues.ingressSessionEstablishment`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.queues.ingressSessionEstablishment)

- [`queues.ingressSessionEstablishment.addedToQueue`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.queues.ingressSessionEstablishment.addedToQueue)

- [`queues.ingressSessionEstablishment.removedFromQueue`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.queues.ingressSessionEstablishment.removedFromQueue)

- [`queues.ingressSessionEstablishment.interruptedInQueue`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.queues.ingressSessionEstablishment.interruptedInQueue)

- [`queues.ingressSessionEstablishment.rejectedAdmissions`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.queues.ingressSessionEstablishment.rejectedAdmissions)

- [`queues.ingressSessionEstablishment.exemptedAdmissions`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.queues.ingressSessionEstablishment.exemptedAdmissions)

- [`queues.ingressSessionEstablishment.successfulAdmissions`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.queues.ingressSessionEstablishment.successfulAdmissions)

- [`queues.ingressSessionEstablishment.attemptedAdmissions`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.queues.ingressSessionEstablishment.attemptedAdmissions)

- [`queues.ingressSessionEstablishment.averageTimeQueuedMicros`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.queues.ingressSessionEstablishment.averageTimeQueuedMicros)

- [`queues.ingressSessionEstablishment.totalAvailableTokens`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.queues.ingressSessionEstablishment.totalAvailableTokens)

### Explain Output for Disk Spilling Stages

Starting in MongoDB 8.2, the [Explain Results](https://www.mongodb.com/docs/manual/reference/explain-results.md#std-label-explain-results) for stages that spill to disk now include standardized metrics under consistent field names. This update provides a more unified way to track disk usage for memory-intensive operations.

The new fields include:

- [spills](https://www.mongodb.com/docs/manual/reference/explain-results.md#std-label-explain-results-spills-table)

- [spilledBytes](https://www.mongodb.com/docs/manual/reference/explain-results.md#std-label-explain-results-spilledBytes-table)

- [spilledRecords](https://www.mongodb.com/docs/manual/reference/explain-results.md#std-label-explain-results-spilledRecords-table)

- [spilledDataStorageSize](https://www.mongodb.com/docs/manual/reference/explain-results.md#std-label-explain-results-spilledDataStorageSize-table)

### Repair Mode Field in Validation Output

Starting in MongoDB 8.2, the [`validate`](https://www.mongodb.com/docs/manual/reference/command/validate.md#mongodb-dbcommand-dbcmd.validate) command and the [`db.collection.validate()`](https://www.mongodb.com/docs/manual/reference/method/db.collection.validate.md#mongodb-method-db.collection.validate) helper method return a new [`repairMode`](https://www.mongodb.com/docs/manual/reference/command/validate.md#mongodb-data-validate.repairMode) field that indicates what types of data inconsistencies the `validate` command attempted to repair, if detected.

### Support for zstd Fast Compression

Starting in MongoDB 8.2, The [`storage.wiredTiger.engineConfig.zstdCompressionLevel`](https://www.mongodb.com/docs/manual/reference/configuration-options.md#mongodb-setting-storage.wiredTiger.engineConfig.zstdCompressionLevel) setting supports negative values for fast zstd compression. Negative values provide faster compression and decompression speeds at the cost of the compression ratio. The new supported range is -7 to 22.

### Targeted Mirrored Reads

Starting in MongoDB 8.2, you can selectively mirror read operations to specific servers that need their caches warmed up by tagging the nodes for read mirroring. Unlike general mirrored reads, targeted read mirroring allows you to target hidden nodes and mirror from both primary and secondary nodes.

You can configure targeted mirrored reads using the `targetedMirroring` field in the [`mirrorReads`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.mirrorReads) parameter.

### Rate Limit Ingress Connection Establishment

Starting in MongoDB 8.2, you can enable rate limiting for ingress connections to preserve CPU resources during overload. When enabled, you can see when the rate of incoming connections exceeds the connection establishment rate they specified and configure parameters to specify how your MongoDB deployment handles excess connections.

You can configure rate limiting using the following new fields:

- [`ingressConnectionEstablishmentRateLimiterEnabled`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.ingressConnectionEstablishmentRateLimiterEnabled)

- [`ingressConnectionEstablishmentRatePerSec`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.ingressConnectionEstablishmentRatePerSec)

- [`ingressConnectionEstablishmentBurstCapacitySecs`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.ingressConnectionEstablishmentBurstCapacitySecs)

- [`ingressConnectionEstablishmentMaxQueueDepth`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.ingressConnectionEstablishmentMaxQueueDepth)

### chars Length Limit for $trim, $ltrim, and $rtrim

Starting in MongoDB 8.2.8, the length of the string you provide to `chars` is limited to 4096 characters. For details, see [$trim Limitations.](https://www.mongodb.com/docs/manual/reference/operator/aggregation/trim.md#std-label-trim-limitations)

## Security

### Queryable Encryption Prefix, Suffix, and Substring Query Public Preview

Starting in MongoDB 9.0, the `prefixPreview`, `suffixPreview`, and `substringPreview` query types using the `text` algorithm are deprecated and removed. Use `prefix`, `suffix`, or `substring` query types with the `string` algorithm instead.

MongoDB 8.2 supports the Public Preview version of prefix, suffix, and substring queries on encrypted string fields in Queryable Encryption enabled collections. If possible, upgrade to MongoDB 9.0 to use the General Availability version of this feature instead of relying on preview functionality.

For details, see [enable substring queries](https://www.mongodb.com/docs/manual/core/queryable-encryption/qe-create-encryption-schema.md#std-label-qe-enable-substring-queries) and [Supported Aggregation Expressions.](https://www.mongodb.com/docs/manual/core/queryable-encryption/reference/supported-operations.md#std-label-qe-supported-aggregation-expressions)

To use Public Preview prefix, suffix, or substring queries with [`mongosh`](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh), download the [Automatic Encryption Shared Library](https://www.mongodb.com/docs/manual/core/queryable-encryption/install-library.md#std-label-qe-csfle-install-library) 8.2 or 8.3, then specify the library path to `mongosh` using the [--cryptSharedLibPath](https://www.mongodb.com/docs/mongodb-shell/reference/options/) option.

## Known Issues

This section describes known issues in MongoDB 8.2 and their resolution status.

| In Version | Issue | Status |
| --- | --- | --- |
| 8.2.4, 8.2.5 | [SERVER-118428](https://jira.mongodb.org/browse/SERVER-118428): Changes to `mongocryptd` limit the maximum size of messages that `mongocryptd` can receive to 16 KiB. Users may encounter this issue when they send commands larger than 16 KiB through automatic Client-Side Field Level Encryption (CSFLE) or Queryable Encryption. To avoid this bug, skip these versions when you upgrade `mongocryptd` or use the [crypt_shared library](https://www.mongodb.com/docs/manual/core/queryable-encryption/install-library.md#std-label-qe-reference-shared-library). | Unresolved. |
| 8.2.0 | [SERVER-106469](https://jira.mongodb.org/browse/SERVER-106469): The `mongocryptd`, `mongod`, and `mongos` processes do not start on Windows when launched with the `--logpath NUL` argument. A third-party dependency mistakenly disallows the use of NUL, resulting in this log file path preventing `mongocryptd` from starting. MongoDB drivers may fail to start `mongocryptd` successfully on Windows if `--logpath NUL` is specified. The MongoDB .NET/C# Driver uses `--logpath NUL` in its default configuration and will fail to start on Windows. You can avoid the .NET/C# driver `mongocryptd` issue in the following ways: Use the [Automatic Encryption Shared Library](https://www.mongodb.com/docs/manual/core/queryable-encryption/install-library.md#std-label-qe-reference-shared-library) instead of `mongocryptd`.; Specify a non-NUL log file path when starting `mongocryptd`. | We are targeting a fix for this issue in MongoDB 8.2.1. |
| 8.2.0 | [SERVER-109626](https://jira.mongodb.org/browse/SERVER-109626): v8.2.0 introduces some change stream performance regressions. Applications relying on change streams for real-time data processing may experience up to a 15% performance degradation compared to v8.0. | Fixed in MongoDB 8.2.1. Upgrading to 8.2.1 restores the pre-8.2 change stream behavior for the `collectionUUID` and `updateDescription.disambiguatedPaths` fields and removes the performance regression. |
| 8.2.0 | [SERVER-110250](https://jira.mongodb.org/browse/SERVER-110250): Users running memory-intensive operations that require disk spilling can experience server crashes if the number of actively spilling queries exceeds `1000`. To mitigate this issue, raise the `spillWiredTigerSessionMax` `setParameter` value to a higher value. | We are targeting a fix for this issue in MongoDB 8.2.1. |

## Server Parameters

Starting in MongoDB 8.2, the following server parameters are available:

- [`ShardingTaskExecutorPoolMaxQueueDepth`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.ShardingTaskExecutorPoolMaxQueueDepth)

## Changes Introduced in MongoDB 8.1

The following section describes changes and new features introduced in MongoDB 8.1.

### Performance Improvements

MongoDB 8.1 introduces performance improvements from MongoDB 8.0, including:

- Up to 195% improved throughput for time-series bulk insertions.

- Up to 40% improved throughput for match filter queries.

- Up to 20% improved throughput for queries on documents with arrays.

- Up to 10% improved throughput for in-cache read workloads.

- Up to 5% reduction in CPU usage.

**Note:**

The amount of performance improvement can vary depending on the configuration of your workloads and database instances.

### Add Comments to Query Settings

Starting in MongoDB 8.1 (and 8.0.4), you can use [`setQuerySettings`](https://www.mongodb.com/docs/manual/reference/command/setquerysettings.md#mongodb-dbcommand-dbcmd.setQuerySettings) to add comments to query settings. For example, add a comment that indicates why you added query settings.

### Aggregation Accumulators

Starting in MongoDB 8.1, the following aggregation accumulators are available:

- [`$concatArrays`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/concatarrays.md#mongodb-group-grp.-concatArrays)

- [`$setUnion`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/setunion.md#mongodb-group-grp.-setUnion)

### Aggregation Stages

Starting in MongoDB 8.1, the following aggregation stages are available:

- [`$listClusterCatalog`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/listclustercatalog.md#mongodb-pipeline-pipe.-listClusterCatalog)

### Audit Log Improvements

Starting in MongoDB 8.1, if a client application connects to `mongos` through a load balancer, the origin client computer and load balancer IP addresses and ports are included in the audit log. You can use the log to match an audit event with the origin client computer.

For details, see [OCSF Schema Audit Messages](https://www.mongodb.com/docs/manual/reference/audit-message/ocsf.md#std-label-event-audit-messages-ocsf) and [mongo Schema Audit Messages.](https://www.mongodb.com/docs/manual/reference/audit-message/mongo.md#std-label-event-audit-messages-mongo)

### `connectionStatus` Connection UUID

Starting in MongoDB 8.1, you can access the currently connected client's UUID through [`connectionStatus.authInfo.UUID`.](https://www.mongodb.com/docs/manual/reference/command/connectionstatus.md#mongodb-data-connectionStatus.authInfo.UUID)

### Disk Space

Starting in MongoDB 8.1 (and 8.0.5), if disk space is running low, MongoDB fails queries that are spilling to disk.

### $geoNear Improvements

Starting in MongoDB 8.1, some previously failing [`$geoNear`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/geonear.md#mongodb-pipeline-pipe.-geoNear) queries with hidden 2d or 2dsphere indexes now succeed. In previous releases, some `$geoNear` queries used to unnecessarily fail with an `IndexNotFound` error when they included a hidden index due to confusion over which index to use.

### Improved Accuracy for Operation Duration Metric

Starting in MongoDB 8.1, the `durationMillis` metric reported in [slow query logs](https://www.mongodb.com/docs/manual/reference/log-messages.md#std-label-log-message-json-examples-slow-op) accounts for time spent processing authorization and parsing the command. As a result, `durationMillis` more closely reflects the full command duration.

### Inconsistency Types

Starting in MongoDB 8.1, the following inconsistency types are available:

- [`CollectionAuxiliaryMetadataMismatch`](https://www.mongodb.com/docs/manual/reference/inconsistency-type/collectionauxiliarymetadatamismatch.md#mongodb-data-CollectionAuxiliaryMetadataMismatch)

### `$lookup` Support for Encrypted Collections

Starting in MongoDB 8.1, you can reference multiple encrypted collections in a [`$lookup`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/lookup.md#mongodb-pipeline-pipe.-lookup) stage.

To learn more, see:

- [$lookup with Encrypted Collections](https://www.mongodb.com/docs/manual/reference/operator/aggregation/lookup.md#std-label-lookup-behavior)

- [Supported Operations for Automatic Encryption](https://www.mongodb.com/docs/manual/core/csfle/reference/supported-operations.md#std-label-csfle-lookup-graphLookup-behavior)

- [Supported Operations for Queryable Encryption](https://www.mongodb.com/docs/manual/core/queryable-encryption/reference/supported-operations.md#std-label-qe-lookup-graphLookup-behavior)

### $merge Missing Fields

Starting in MongoDB 8.1, if the [`$merge`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/merge.md#mongodb-pipeline-pipe.-merge) aggregation stage's [supporting index](https://www.mongodb.com/docs/manual/reference/operator/aggregation/merge.md#std-label-merge-on-supporting-index) is not sparse, the fields specified for the [on](https://www.mongodb.com/docs/manual/reference/operator/aggregation/merge.md#std-label-merge-on) option can be missing or contain a null value.

### Query Statistics

Starting in MongoDB 8.1, query statistics are collected and reported for [`count`](https://www.mongodb.com/docs/manual/reference/command/count.md#mongodb-dbcommand-dbcmd.count) and [`distinct`](https://www.mongodb.com/docs/manual/reference/command/distinct.md#mongodb-dbcommand-dbcmd.distinct) commands. For details, see [count Command Query Shape](https://www.mongodb.com/docs/manual/reference/operator/aggregation/querystats.md#std-label-queryStats-count-query-shape) and [distinct Command Query Shape.](https://www.mongodb.com/docs/manual/reference/operator/aggregation/querystats.md#std-label-queryStats-distinct-query-shape)

### Server Parameters

Starting in MongoDB 8.1, the following server parameters are available:

- [`enableAutoCompaction`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.enableAutoCompaction)

- [`upsertMaxRetryAttemptsOnDuplicateKeyError`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.upsertMaxRetryAttemptsOnDuplicateKeyError)

- [`AbortExpiredTransactionsSessionCheckoutTimeout`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.AbortExpiredTransactionsSessionCheckoutTimeout) *(also available in 8.0.13)*

- [`JWKSMinimumQuiescePeriodSecs`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.JWKSMinimumQuiescePeriodSecs)

- [`catalogCacheCollectionMaxEntries`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.catalogCacheCollectionMaxEntries)

- [`catalogCacheDatabaseMaxEntries`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.catalogCacheDatabaseMaxEntries)

- `catalogCacheIndexMaxEntries`

- [`wiredTigerSessionMax`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.wiredTigerSessionMax)

### `serverStatus` Metrics

Starting in MongoDB 8.1 (and 8.0.4, 7.0.14, 6.0.20), the [`indexStats`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.indexStats) section of the [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-dbcommand-dbcmd.serverStatus) command output tracks indexes in `prepareUnique` state.

MongoDB 8.1 adds the following server status metrics:

- `maxTimestampEligibleForTruncate` in [`changeStreamPreImages.purgingJob`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.changeStreamPreImages.purgingJob)

- [`metrics.ttl.invalidTTLIndexSkips`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.metrics.ttl.invalidTTLIndexSkips)

- [`metrics.repl.timestamps`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.metrics.repl.timestamps)

- [`metrics.repl.timestamps.oldestTimestamp`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.metrics.repl.timestamps.oldestTimestamp)

- [`query.planning.fastPath.express`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.query.planning.fastPath.express)

- [`query.planning.fastPath.idHack`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.query.planning.fastPath.idHack)

- [`metrics.abortExpiredTransactions.successfulKills`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.metrics.abortExpiredTransactions.successfulKills) *(also available in 8.0.13)*

- [`metrics.abortExpiredTransactions.timedOutKills`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.metrics.abortExpiredTransactions.timedOutKills) *(also available in 8.0.13)*

- [`wiredTiger.version`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-serverstatus-serverstatus.wiredTiger.version)

### Slow Query Metrics for Disk Spilling

Starting in MongoDB 8.1, [log messages for slow queries](https://www.mongodb.com/docs/manual/reference/log-messages.md#std-label-log-message-slow-ops) contain new metrics if the query execution writes temporary files to disk. These metrics are prefixed by the query execution stage that caused the query to exceed the memory limit. For example, `sortSpills` indicates the number of times that the sort stage of query execution wrote temporary files to disk.

| Metric | Description |
| --- | --- |
| `<executionPart>Spills` | Number of times the corresponding query execution stage wrote temporary files to disk |
| `<executionPart>SpilledBytes` | Size, in bytes, of the memory released by writing temporary files to disk |
| `<executionPart>SpilledDataStorageSize` | Size, in bytes, of disk space used for temporary files |
| `<executionPart>SpilledRecords` | Number of records written to temporary files on disk |

For more information on writing temporary files to disk, see [`allowDiskUse()`.](https://www.mongodb.com/docs/manual/reference/method/cursor.allowdiskuse.md#mongodb-method-cursor.allowDiskUse)

### Stable API

Starting in MongoDB 8.1, the [`renameCollection`](https://www.mongodb.com/docs/manual/reference/command/renamecollection.md#mongodb-dbcommand-dbcmd.renameCollection) command and corresponding shell method, [`db.collection.renameCollection()`](https://www.mongodb.com/docs/manual/reference/method/db.collection.renamecollection.md#mongodb-method-db.collection.renameCollection), are included in [Stable API](https://www.mongodb.com/docs/manual/reference/stable-api.md#std-label-stable-api) V1.

### Support for Search Stages in Explain Results

Starting in MongoDB 8.1, the [explain results](https://www.mongodb.com/docs/manual/reference/explain-results.md#std-label-explain-results) include execution stats for the [`$search`](https://www.mongodb.com/docs/search/query/aggregation-stages/search.md#mongodb-pipeline-pipe.-search), [`$searchMeta`](https://www.mongodb.com/docs/search/query/aggregation-stages/searchMeta.md#mongodb-pipeline-pipe.-searchMeta), and [`$vectorSearch`](https://www.mongodb.com/docs/vector-search/query/aggregation-stages/vector-search-stage.md#mongodb-pipeline-pipe.-vectorSearch) stages.

To learn more, see:

- [Execution Plan Statistics for Search Queries](https://www.mongodb.com/docs/manual/reference/explain-results.md#std-label-explain-results-search)

- [Explain Search Results](https://www.mongodb.com/docs/search/query/explain.md#std-label-explain-ref)

- [Explain MongoDB Vector Search Results](https://www.mongodb.com/docs/vector-search/query/explain.md#std-label-avs-explain-ref)

### Support for Search Index Commands on Views

Starting in MongoDB 8.1, you can run [`createSearchIndexes`](https://www.mongodb.com/docs/manual/reference/command/createsearchindexes.md#mongodb-dbcommand-dbcmd.createSearchIndexes), [`updateSearchIndex`](https://www.mongodb.com/docs/manual/reference/command/updatesearchindex.md#mongodb-dbcommand-dbcmd.updateSearchIndex), [`dropSearchIndex`](https://www.mongodb.com/docs/manual/reference/command/dropsearchindex.md#mongodb-dbcommand-dbcmd.dropSearchIndex), and [`$listSearchIndexes`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/listsearchindexes.md#mongodb-pipeline-pipe.-listSearchIndexes) to create, modify, drop, and list Atlas Search indexes and Atlas Vector Search indexes on compatible standard [views](https://www.mongodb.com/docs/manual/core/views.md#std-label-views-landing-page)  that contain only the following stages:

- [`$addFields`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/addfields.md#mongodb-pipeline-pipe.-addFields)

- [`$set`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/set.md#mongodb-pipeline-pipe.-set)

- [`$match`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/match.md#mongodb-pipeline-pipe.-match) wrapping an [`$expr`](https://www.mongodb.com/docs/manual/reference/operator/query/expr.md#mongodb-query-op.-expr) operation

You can run aggregation pipelines that contain [`$search`](https://www.mongodb.com/docs/search/query/aggregation-stages/search.md#mongodb-pipeline-pipe.-search) and [`$searchMeta`](https://www.mongodb.com/docs/search/query/aggregation-stages/searchMeta.md#mongodb-pipeline-pipe.-searchMeta) stages on views that use a search index. You can also run aggregation pipelines that contain a [`$vectorSearch`](https://www.mongodb.com/docs/vector-search/query/aggregation-stages/vector-search-stage.md#mongodb-pipeline-pipe.-vectorSearch) stage on views that contain a vector search index.

### Validate Command Index Specifications Output

Starting in MongoDB 8.1, the [`validate`](https://www.mongodb.com/docs/manual/reference/command/validate.md#mongodb-dbcommand-dbcmd.validate) command includes index specifications in the [`validate.indexDetails`](https://www.mongodb.com/docs/manual/reference/command/validate.md#mongodb-data-validate.indexDetails) output field.

### Validation Action for Handling Invalid Documents

Starting in MongoDB 8.1, you can set your schema's `validationAction` option to `errorAndLog`, in which MongoDB rejects any insert or update that violates the validation criteria and logs the error to the `mongod` log file.

For more information, see [Choose How to Handle Invalid Documents.](https://www.mongodb.com/docs/manual/core/schema-validation/handle-invalid-documents.md#std-label-schema-validation-handle-invalid-docs)

## Upgrade Procedures

**Important: Feature Compatibility Version**

To upgrade to MongoDB 8.2 from a 8.0 deployment, the 8.0 deployment must have `featureCompatibilityVersion` set to `8.0`. To check the version:

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

To upgrade to MongoDB 8.2, refer to the upgrade instructions specific to your MongoDB deployment:

- [Upgrade a Standalone to 8.2](https://www.mongodb.com/docs/manual/release-notes/8.2-upgrade-standalone.md#std-label-8.2-upgrade-standalone)

- [Upgrade a Replica Set to 8.2](https://www.mongodb.com/docs/manual/release-notes/8.2-upgrade-replica-set.md#std-label-8.2-upgrade-replica-set)

- [Upgrade a Sharded Cluster to 8.2](https://www.mongodb.com/docs/manual/release-notes/8.2-upgrade-sharded-cluster.md#std-label-8.2-upgrade-sharded-cluster)

If you need guidance on upgrading to 8.2, MongoDB professional services offer support to help ensure a smooth transition without interruption to your MongoDB application. To learn more, see [MongoDB Consulting.](https://www.mongodb.com/products/consulting)

## Download

To download MongoDB 8.2, go to the [MongoDB Download Center.](https://www.mongodb.com/try/download/community-edition)

**Important:**

Minor releases may not support some features, including Atlas Live Migration or `mongosync`. If you require these features, use a Major release instead.

## Downgrade Considerations

### Only Single-Version Downgrades are Supported

MongoDB only supports single-version downgrades. You cannot downgrade to a release that is multiple versions behind your current release.

For example, you can downgrade a 8.2-series to a 8.0-series deployment. However, further downgrading that 8.0-series deployment to a 7.0-series deployment is not supported.

### Downgrade Policy

- Binary downgrades aren't supported for MongoDB Community Edition.

- You cannot downgrade your deployment's FCV (feature compatibility version) to or from a minor release version of MongoDB.

- If you upgrade or downgrade your deployment's FCV (feature compatibility version), you cannot downgrade your Enterprise deployment's binary version without assistance from support.
