Warning
MongoDB 8.3 Not Yet Available
MongoDB 8.3 release candidates are not yet available. This version of the manual is for an upcoming release and is currently a work in progress.
General Changes
serverStatus Output
serverStatus includes the following new fields in its output:
aggregate.withExtensionsub-field inmetrics.commands.aggregate, tracking success and failure counts
MongoDB 8.3 removes the service field in the serverStatus output.
Starting in MongoDB 8.3, you can exclude all optional fields
from the serverStatus output by specifying none: 1.
After you exclude all optional fields, you can then specify
the fields you want to include.
For details, see Exclude All Optional Fields.
You can also optionally specify lockContentionMetrics: 1 in the
serverStatus command to include lockContentionMetrics
in the output.
String Conversion Enhancements
Starting in MongoDB 8.3, $toString can convert additional
BSON types to strings, including objects, arrays, regular expressions,
MaxKeys, MinKeys, and timestamps. For details, see
$toString.
Geospatial Index Generation
Starting in MongoDB 8.3, 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.
This change may require you to rebuild geospatial indexes if your documents contain legacy numeric coordinate values that precede GeoJSON coordinates and existing indexes rely on that behavior. Review geospatial queries to confirm they return expected results.
cachePressureQueryPeriodMilliseconds Parameter
MongoDB 8.3 adds the cachePressureQueryPeriodMilliseconds parameter
which sets the time interval MongoDB waits between checks for storage engine cache
pressure. If the storage engine is under cache pressure, MongoDB aborts the oldest
transaction. For details, see cachePressureQueryPeriodMilliseconds.
diagnosticDataCollectionDirectorySizeMB Parameter
MongoDB 8.3 increases the default value of
diagnosticDataCollectionDirectorySizeMB from 200 to 500
MiB.
BSONObjectTooLarge Code for Upsert Errors
Starting in 8.3, upsert operations that produce a BSON object
that is too large return the 10334 BSONObjectTooLarge error code.
In earlier versions, upsert operations that produce a BSON object that is too
large return the 17419 or 17420 error codes.
checkBSONConformance Field
Starting in 8.3, MongoDB no longer automatically enables the
checkBSONConformance field in the db.collection.validate() method
when full is true.
New Expression $subtype
MongoDB 8.3 introduces a new $subtype expression to extract the
subtype of binary data objects.
New Expressions for Extended JSON Conversion
MongoDB 8.3 introduces new aggregation expressions for converting between BSON and Extended JSON (EJSON) format:
$serializeEJSON- Converts BSON values to Extended JSON format with type wrappers. Supports both Canonical and Relaxed Extended JSON formats.$deserializeEJSON- Converts Extended JSON format back to native BSON values.
These expressions can be combined with $convert to parse
JSON strings, transform Extended JSON values into native BSON values,
and convert back to JSON format.
Sharding
findShardsOnConfigTimeoutMS Parameter
MongoDB 8.3 adds the findShardsOnConfigTimeoutMS parameter
which sets the timeout in milliseconds for find operations
against the config.shards namespace. For details, see
findShardsOnConfigTimeoutMS.
config.csrs.indexes Removed
MongoDB 8.3 removes the config.csrs.indexes namespace.
2dsphereIndexVersion
Starting in MongoDB 8.3, 2dsphereIndexVersion
is set to version 4 by default.
If you need to downgrade the FCV to anything below 8.3, you
must first drop the 2dsphere version 4 indexes.
Time Series
refineCollectionShardKey Formatting
Starting in MongoDB 8.3, refineCollectionShardKey for time-series
collections only accepts shard keys specified using the collection's
logical meta and time fields. MongoDB no longer supports specifying keys using
the underlying buckets format.
Index Naming Restrictions
Starting in MongoDB 8.3, creating an index with the name of "_id_" or
specifying a hint of "_id_" on time series collections returns an error.
timeField Naming Restrictions
Starting in MongoDB 8.3, you cannot create a timeField that starts with
a $ character.
Logging
Fields to Track Use of Memory by Queries
Starting in MongoDB 8.3, you can use the following new fields to track query memory use:
Field | Description |
|---|---|
| Number of bytes of tracked memory in use by the current query operation. |
| Maximum number of bytes of tracked memory in use by the current query operation. |
Both fields appear in the following places:
db.currentOp()outputDatabase profiler output
The peakTrackedMemBytes field also appears in the following places:
PlanCache.list()output$planCacheStatsoutput
Mongos Query Shape Field
Starting in MongoDB 8.3, slow query log entries have an optional
routerQueryShapeHash field that contains that query shape of the following
operations that originate on the mongos :