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

# Compatibility Changes in MongoDB 8.2

## General Changes

### $$CLUSTER\_TIME Errors on Standalone Deployments

Starting in MongoDB 8.2, if you try to use the [`CLUSTER_TIME`](https://www.mongodb.com/docs/manual/reference/aggregation-variables.md#mongodb-variable-variable.CLUSTER_TIME) variable in a standalone deployment, the server returns an error.

### $rankFusion on Views

Starting in MongoDB 8.2, `$rankFusion` can now run on [views](https://www.mongodb.com/docs/manual/core/views.md#std-label-views-landing-page). For more information, see [`$rankFusion`.](https://www.mongodb.com/docs/manual/reference/operator/aggregation/rankfusion.md#mongodb-pipeline-pipe.-rankFusion)

### orphanCleanupDelaySecs Change

Starting in MongoDB 8.2, the default value of [`orphanCleanupDelaySecs`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.orphanCleanupDelaySecs) is `3600` (previously `900`).

### Remaining Resharding Time Threshold Change

Starting in MongoDB 8.2 (also available in 8.1.2 and 8.0.13), resharding enters the critical section when the estimated time to complete the remaining work is **500 ms** or less.

### $cpuNanos Change

Starting in MongoDB 8.2, `cpuNanos` is located in the [`$queryStats`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/querystats.md#mongodb-pipeline-pipe.-queryStats) aggregation stage metrics and includes additional metrics related to CPU usage for query operations. The `cpuNanos` metric is only available on Linux systems.

In earlier versions, `cpuNanos` was located in [operationMetrics.](https://www.mongodb.com/docs/manual/reference/explain-results.md#std-label-executionStats)

### Change Streams

In MongoDB 8.2.0, [collectionUUID](https://www.mongodb.com/docs/manual/reference/change-events/update.md#std-label-ce-update-collectionUUID) and [updateDescription.disambiguatedPaths](https://www.mongodb.com/docs/manual/reference/change-events/update.md#std-label-ce-update-ud-disambiguatedPaths) are included in applicable change events even if you do not set `showExpandedEvents`. In MongoDB versions earlier than 8.2.0 and in versions 8.2.1 and later, these fields are included only if you open the change stream with `showExpandedEvents: true`.

If you upgrade from MongoDB 8.2.0 to MongoDB 8.2.1 or later, `collectionUUID` and `updateDescription.disambiguatedPaths` no longer appear in change events unless you set `showExpandedEvents` when opening the stream.

Applications should not rely on `commitTimestamp`. It is exposed in MongoDB 8.2.0, but is not present by default in MongoDB 8.2.1 and later.

### Removed Parameters

MongoDB 8.2 removes the `catalogCacheIndexMaxEntries` parameter.

## Compatibility Changes Introduced in MongoDB 8.1

MongoDB 8.2 also includes changes introduced in MongoDB 8.1. This section describes compatibility changes that were introduced in MongoDB 8.1.

### $densify Validation Changes

Starting in MongoDB 8.1, the [`$densify`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/densify.md#mongodb-pipeline-pipe.-densify) stage errors if `field` shares its prefix with any field in the `partitionByFields` array. For example, the following combinations of `field` and `partitionByFields` result in an error:

- `field: "timestamp"`, `partitionByFields: ["timestamp"]`

- `field: "timestamp"`, `partitionByFields: ["timestamp.hours"]`

- `field: "timestamp.hours"`, `partitionByFields: ["timestamp"]`

### Driver Incompatibility

Any application that runs the [`buildInfo`](https://www.mongodb.com/docs/manual/reference/command/buildinfo.md#mongodb-dbcommand-dbcmd.buildInfo) command before authenticating is incompatible with MongoDB 8.1. The following driver versions are incompatible with MongoDB 8.1 because of this change:

- JVM drivers v3.x and earlier (includes Java Sync, Java Reactive Streams, Kotlin Coroutine, Kotlin Sync, and Scala drivers)

- .NET/C# Driver v2.14.1 and earlier

### Hedged Reads Removed

Starting in MongoDB 8.1, hedged reads are removed. If you specify hedged read options in a query, MongoDB executes the query but ignores the hedging options and logs a warning.

The following [server parameters](https://www.mongodb.com/docs/manual/reference/parameters.md#std-label-server-parameters) related to hedged reads no longer have an effect:

- `maxTimeMSForHedgedReads`

- `opportunisticSecondaryTargeting`

- `readHedgingMode`

The [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverstatus.md#mongodb-dbcommand-dbcmd.serverStatus) command no longer returns the `hedgingMetrics` object.

### Interpolating Identical Values in Different Partitions

Starting in MongoDB 8.0.20, `$fill` can use the `linear` method to interpolate if there are identical values in different partitions.

Earlier MongoDB versions return an error stating the sort field cannot have repeated values.

For details, see [Interpolate Identical Values in Different Partitions.](https://www.mongodb.com/docs/manual/reference/operator/aggregation/fill.md#std-label-fill-example-interpolating-new-values)

### Maximum Incoming Connections

Starting in MongoDB 8.1 (and 8.0.16, 7.0.27), the maximum number of incoming connections that you can set with the [`net.maxIncomingConnections`](https://www.mongodb.com/docs/manual/reference/configuration-options.md#mongodb-setting-net.maxIncomingConnections) configuration file option on Linux systems is the value of ([RLIMIT\_NOFILE](https://man7.org/linux/man-pages/man2/getrlimit.2.html) / 2) \* 0.8. If you specify a larger value, MongoDB uses the default value.

### Subtype Conversion

Starting in MongoDB 8.1, `$convert` returns an error when attempting to convert between different binData subtypes. In MongoDB 8.0, `$convert` returns the original value and original subtype: no conversion is performed. MongoDB versions before 8.0 don't have binData conversion.

### Validation Action for Handling Invalid Documents

If you use an `errorAndLog` validation action on a collection, MongoDB cannot downgrade until you drop the collection, or if you change the validation action for the collection to one supported in older versions. To change the validation action on a collection, use the [`collMod`](https://www.mongodb.com/docs/manual/reference/command/collmod.md#mongodb-dbcommand-dbcmd.collMod) command.

### Deprecations

| Deprecated | Description |
| --- | --- |
| `metadataRefreshInTransactionMaxWaitBehindCritSecMS` | Starting in MongoDB 8.1, the old `metadataRefreshInTransactionMaxWaitBehindCritSecMS` parameter is renamed `metadataRefreshInTransactionMaxWaitMS`. You can continue to use `metadataRefreshInTransactionMaxWaitBehindCritSecMS` as the parameter name, but it is deprecated and will be removed in a future MongoDB release. For details, see [`metadataRefreshInTransactionMaxWaitMS`.](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.metadataRefreshInTransactionMaxWaitMS) |
