Release Notes for MongoDB 4.0

Minor Releases

4.0.13 - Oct 19, 2019

Issues fixed:

4.0.12 - Aug 12, 2019

Issues fixed:

4.0.11 - Jul 26, 2019

Issues fixed:

  • SERVER-39756: Sharding a very large collection can result ina long stall of writes against this collection
  • SERVER-40134: Distinct command against a view can returnincorrect results when the distinct path is multikey
  • SERVER-40535: Possibility to get a non-existent key if usingReadConcern level:local when reading signing keys in ReplicaSet
  • SERVER-41361: Do not read at lastApplied while already holding the PBWM lock on secondaries
  • SERVER-41869: Reverse mutex acquisition order in CatalogCache::_scheduleCollectionRefresh
  • SERVER-42055: Only acquire a collection IX lock to write the lastVote document
  • SERVER-42232: Adding a new shard renders all precedingresume tokens invalid
  • All JIRA issues closed in 4.0.11%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.11%27)
  • 4.0.11 Changelog

Note

Fixed issues include those that resolve the following CommonVulnerabilities and Exposures (CVEs):

4.0.10 - May 31, 2019

Issues fixed:

4.0.9 - Apr 16, 2019

Issues fixed:

Note

Fixed issues include those that resolve the following CommonVulnerabilities and Exposures (CVEs):

4.0.8 - Mar 29, 2019

Issues fixed:

4.0.7 - Mar 25, 2019

Issues fixed:

  • SERVER-13779: Allow $not to be applied to $regex (currently only /regex/ syntax is allowed)
  • SERVER-35740: Report high-water-mark resume token with each (possibly empty) change stream batch
  • TOOLS-2158: mongodump failing on Windows with “error opening system CA store: Access is denied.”
  • All JIRA issues closed in 4.0.7%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.7%27)
  • 4.0.7 Changelog

4.0.6 - Feb 7, 2019

Issues fixed:

4.0.5 - Dec 20, 2018

Issues fixed:

  • SERVER-36437: The dbstats command should lock the database in MODE_IS instead of MODE_S
  • SERVER-37182: Different values when referencing whole object vs. a field of that object after $arrayToObject
  • SERVER-37200: $match stage following $listSessions not working against mongos
  • SERVER-37557: Add startup warning about enableMajorityReadConcern and usage of arbiters
  • All JIRA issues closed in 4.0.5%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.5%27)
  • 4.0.5 Changelog

4.0.4 - Nov 8, 2018

Issues fixed:

  • SERVER-26854: LockStats for sub-operations should not include time for previous sub ops
  • SERVER-35323: sessionId matching ignores userId part of the lsid
  • SERVER-37058: Update with numeric field names inside an array can cause validation to fail
  • SERVER-37132: Negation of $in with regex can incorrectly plan from the cache, leading to missing query results
  • TOOLS-2069: mongoreplay does not support SCRAM-SHA-256
  • TOOLS-2131: mongorestore hang in replaying oplog with –archive and –oplogReplay option
  • All JIRA issues closed in 4.0.4%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.4%27)
  • 4.0.4 Changelog

4.0.3 - Oct 9, 2018

Issues fixed:

4.0.2 - Aug 29, 2018

Issues fixed:

4.0.1 - Aug 6, 2018

Issues fixed:

Multi-Document Transactions

Starting in version 4.0, MongoDB provides the ability to performmulti-document transactions against replicasets. With multi-document transactions, until a transaction commits, nowrite operations in the transaction are visible outside thetransaction. That is, the multi-document transactions are atomic.

Important

In most cases, multi-document transaction incurs a greaterperformance cost over single document writes, and theavailability of multi-document transactions should not be areplacement for effective schema design. For many scenarios, thedenormalized data model (embedded documents and arrays) will continue to be optimal for yourdata and use cases. That is, for many scenarios, modeling your dataappropriately will minimize the need for multi-documenttransactions.

For additional transactions usage considerations(such as runtime limit and oplog size limit), see alsoProduction Considerations.

Feature Compatibility

The featureCompatibilityVersion of all members of the replica setmust be 4.0 or greater. To check thefeatureCompatibilityVersion for a member, connect to the member andrun the following command:

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

For more information on the featureCompatibilityVersion flag, seesetFeatureCompatibilityVersion.

mongo Shell Methods

MethodDescription
Session.startTransaction()Starts a multi-statement transaction.
Session.commitTransaction()Commits the transaction.
Session.abortTransaction()Aborts the transaction.

MongoDB Drivers

Clients require MongoDB drivers updated for MongoDB 4.0 to use transactions.

Read Concern snapshot

MongoDB 4.0 introduces a new read concern level"snapshot" for multi-document transaction.

For a multi-document transaction, MongoDBmay sometimes substitute a stronger read concern for"local" and "majority" read concern.

For a list of all operations that accept read concerns, seeOperations That Support Read Concern.

Read Preference

Multi-document transactions that containread operations must use read preference primary. Alloperations in a given transaction must route to the same member.

Commands

Locks

By default, multi-document transactionswait 5 milliseconds to acquire locks required by the operations inthe transaction. If the transaction cannot acquire its required lockswith the 5 milliseconds, the transaction aborts.

You can use the maxTransactionLockRequestTimeoutMillisparameter to adjust how long transactions wait to acquire locks.

Transactions release all locks upon abort or commit.

$currentOp

The aggregation pipeline stage $currentOp (and thecurrentOp command and mongo shell helperdb.currentOp() method) return information on inactive sessionswhich are holding locks as part of a transaction.

Parameters

Aggregation

New Type Conversion Operators

MongoDB 4.0 adds the following new aggregation operators for typeconversion:

OperatorDescription
$convertConvert value to specified type.
$toBoolConvert value to boolean.
$toDateConvert value to Date.
$toDecimalConvert value to Decimal128.
$toDoubleConvert value to Double.
$toIntConvert value to integer.
$toLongConvert value to long.
$toObjectIdConvert value to ObjectId.
$toStringConvert value to string.

New String Operators

MongoDB 4.0 adds the following new aggregation string operators:

OperatorDescription
$ltrimRemoves whitespace or the specified characters from thebeginning of a string.
$rtrimRemoves whitespace or the specified characters from the end of astring.
$trimRemoves whitespace or the specified characters from thebeginning and end of a string.

Additional Improvements

$bucket

The $bucket stage no longer requires boundariesdocument arguments to be wrapped in $literal.

$dateToString

The $dateToString aggregation operator has the followingoption changes:

Note

Requires featureCompatibilityVersion (fcv) set to "4.0" or greater.

  • A new option onNull specifies the value to return if the dateis null or missing.
  • The option format is now optional.

$dateFromParts

If the value specified for fields other than year, isoYear, andtimezone is outside the valid range, $dateFromPartscarries or subtracts the difference from other date parts to calculatethe date. For more information, see Value Range.

$dateFromString

The $dateFromString aggregation operator takes anoptional format field.

$currentOp

The aggregation pipeline stage $currentOp supports thefollowing new options:

  • idleSessions option to return information on inactive sessionswhich are holding locks as part of a transaction.
  • localOps option to report operations that are running locally onthe current mongos instance, rather than reportingoperations that are running on the shards.

MongoDB Drivers

The following drivers are feature compatible with MongoDB 4.0:

- Java 3.8.0- Python 3.7.0- C 1.11.0- C# 2.7- Node 3.1.0- Ruby 2.6.0- Perl 2.0.0- PHPC 1.5.0- Scala 2.4.0

Security

Add Support for SCRAM-SHA-256

Note

To use SCRAM-SHA-256, thefeatureCompatibilityVersion must be set to 4.0. For moreinformation on featureCompatibilityVersion, see View FeatureCompatibilityVersion andsetFeatureCompatibilityVersion.

MongoDB adds support for SCRAM authenticationmechanism SCRAM-SHA-256, which uses the SHA-256hash function. To modify the iteration count for SCRAM-SHA-256,MongoDB adds a new parameter scramSHA256IterationCount.

New Option for Create and Update User Operations

When creating or updating a SCRAM user, you can indicate the specificSCRAM mechanism or mechanisms to use for the user credentials.Specifically, MongoDB 4.0 adds the mechanisms option to thefollowing commands and mongo shell helpers:

CommandMethod
createUserdb.createUser()
updateUserdb.updateUser()

When using SCRAM-SHA-256, MongoDB (i.e. the server) requiresundigested password. Starting in MongoDB 4.0, the default value ofdigestPassword is true for createUser, and thedefault value of passwordDigestor is "server". In earlierMongoDB versions, digestPassword is false and clientrespectively.

New Option for isMaster Command

Starting in MongoDB 4.0, the isMaster command accepts anoptional field saslSupportedMechs: <db.user> to return anadditional field isMaster.saslSupportedMechs in its result.

isMaster.saslSupportedMechs is an array of SASL mechanisms usedto create the specified user’s credentials.

Remove Support for MONGODB-CR

Starting in version 4.0, MongoDB removes support for the deprecatedMongoDB Challenge-Response (MONGODB-CR) authentication mechanism.

Since version 3.0, MongoDB has not supported the creation ofMONGODB-CR users unless the deployment had been upgraded from a 2.6or earlier deployment that already had MONGODB-CR users and had notupgraded the authentication schema.

If your deployment has user credentials stored in MONGODB-CRschema, you must upgrade to Salted Challenge ResponseAuthentication Mechanism (SCRAM)before youupgrade to version 4.0. For information on upgrading to SCRAM, seeUpgrade to SCRAM.

usersInfo Enhancement

The usersInfo command can return information across all databasesby specifying:

  1. { usersInfo: { forAllDBs: true } }

The usersInfo and the mongo shell helpersdb.getUser() and db.getUsers() method accept a newoptional filter document. The filter document specifies$match stage conditions to return information only forusers that match the conditions.

The usersInfo command and the mongo shell helpersdb.getUser() and db.getUsers() method return themechanisms field for the user.

TLS/SSL

Starting in version 4.0, MongoDB uses the native TLS/SSL OS libraries:

WindowsSecure Channel (Schannel)
Linux/BSDOpenSSL
macOSSecure Transport

Associated with this change, the parameteropensslCipherConfig is supported for Linux/BSD and nolonger supported in Windows and macOS.

TLS 1.2 Support

MongoDB 4.0 binaries for macOS support TLS 1.2.

Disable TLS 1.0

MongoDB binaries (mongod, mongos, andmongo) disables support for TLS 1.0 encryption onsystems where TLS 1.1+ is available.

If you need to support TLS 1.0:

The —sslDisabledProtocolsoption is available for the mongo shell in:

  • MongoDB version 4.0+
  • MongoDB version 3.6.5+
  • MongoDB version 3.4.15+

On macOS, to connect mongo shell version 3.6.4 orearlier to a MongoDB 4.0+ deployment requires explicit enabling of TLS1.0.

AES-GCM

MongoDB Enterprise on Windows no longer supports AES256-GCM. Thiscipher is now available only on Linux.

See also

Enable System Store for TLS/SSL on Windows and macOS

New Privilege Actions

To support free Cloud monitoring, MongoDBadds the following privilege actions available for the clusterresource:

MongoDB modifies the clusterMonitor role to include theseprivileges.

x.509 Authentication Certificate Restrictions

Starting in MongoDB 4.0, if you specify—sslAllowInvalidCertificates ornet.ssl.allowInvalidCertificates: true (or in MongoDB 4.2, thealias —tlsAllowInvalidateCertificates ornet.tls.allowInvalidCertificates: true) when using x.509authentication, an invalid certificate is only sufficient toestablish a TLS/SSL connection but is insufficient forauthentication.

If you are using invalid certificates to perform x.509 authentication,update your certificates to valid certificates. For example, you maysign your existing certificates with a trusted CA, or if using a customCA, specify that CA using net.ssl.CAFile.

Enable System Store for TLS/SSL on Windows and macOS

The —sslCertificateSelectoroption (certificateSelector setting) allowsmongod, mongo shell andmongos to use system SSL certificate stores for Windowsand macOS.

The —sslClusterCertificateSelector option(clusterCertificateSelector setting) allowsmongod andmongos to use system TLS/SSL certificate stores for Windowsand macOS for internal TLS/SSL communication within a cluster.

The option —kmipClientCertificateSelector(security.kmip.clientCertificateSelector) allowsmongod and mongos to use system TLS/SSLcertificate stores for Windows and macOS when using TLS/SSL connection to theKMIP server.

Deprecate MMAPv1

Starting in version 4.0, MongoDB deprecates the MMAPv1 storage Engineand will remove MMAPv1 in a future release.

To change your MMAPv1 storage engine deployment toWiredTiger Storage Engine, see:

Replica Set

Remove pv0 for Replica Sets

MongoDB 4.0 removes the deprecated replica set protocol version 0pv0.

Before upgrading to MongoDB 4.0, you must upgrade to pv1.

To upgrade to pv1, connect a mongo shell to thereplica set primary and perform the following sequence of operations:

  1. cfg = rs.conf();
  2. cfg.protocolVersion=1;
  3. rs.reconfig(cfg);

You can use catchUpTimeoutMillis to prioritizebetween faster failovers and preservation of w:1 writes.

For more information on pv1, seeReplica Set Protocol Version.

Remove Master-Slave Replication

MongoDB 4.0 removes support for the deprecated master-slavereplication. Before you can upgrade to MongoDB 4.0, if your deploymentuses master-slave replication, you must upgrade to a replica set.

To convert your master-slave replication, seeConvert a Master-Slave Deployment to a Replica Set.

Journaling and Replica Sets

Starting in MongoDB 4.0, you cannot specify —nojournal option or storage.journal.enabled:false for replica set members that use theWiredTiger storage engine.

rollbackTimeLimitSecs Parameter Available

Starting in MongoDB 4.0, a new rollbackTimeLimitSecsparameter allows for the setting of the time limit in seconds betweenthe common point and the last oplog write entry for the memberindicated for rollback. The default rollback time limit is 1 day.

Wait for Background Index Builds

Starting in version 4.0, MongoDB waits for any in-progressbackground index builds to finishbefore starting a rollback.

Rollback Files

MongoDB adds the parameter createRollbackDataFiles thatdetermines whether during a rollback, MongoDB creates rollback filesthat contains documents affected during the rollback.

replSetGetStatus Output Changes

The replSetGetStatus returns the following new fields:

The following fields returned from replSetGetStatus aredeprecated:

Oplog Size

Starting in MongoDB 4.0, the oplog can grow past its configured sizelimit to avoid deleting the majority commit point.

Change Streams

Database and Deployment Change Streams

MongoDB adds the ability to:

  • Open a change stream cursor for a singledatabase (excluding admin, local, and config database) towatch for changes to all its non-system collections.
  • Open a change stream cursor for a deploymentto watch for changes to all non-system collections across alldatabases except for admin, local, and config.

Note

Requires featureCompatibilityVersion (fcv) set to "4.0" or greater.

Start Time Option

MongoDB adds the ability to specify a start time(startAtOperationTime option) for a change stream.

Change Event Document Changes

The change event documents includethe new fields:

  • the clusterTime which corresponds to timestamp from the oplogentry for the event.
  • the txnNumber and the lsid if the operation is part of amulti-document transaction.

Resume Token Data Type Change

MongoDB 4.0 introduces new hex-encoded string change streams resume tokens:

The resume token _data type depends on the MongoDB versions and,in some cases, the feature compatibility version (fcv) at the timeof the change stream’s opening/resumption (i.e. a change in fcvvalue does not affect the resume tokens for already opened changestreams):

MongoDB VersionFeature Compatibility VersionResume Token _data Type
MongoDB 4.0.7 and later“4.0” or “3.6”Hex-encoded string (v1)
MongoDB 4.0.6 and earlier“4.0”Hex-encoded string (v0)
MongoDB 4.0.6 and earlier“3.6”BinData
MongoDB 3.6“3.6”BinData

With hex-encoded string resume tokens, you can compare and sort theresume tokens.

Regardless of the fcv value, a 4.0 deployment can useeither BinData resume tokens or hex string resume tokens to resume achange stream. As such, a 4.0 deployment can use a resumetoken from a change stream opened on a collection from a 3.6deployment.

New resume token formats introduced in a MongoDB versioncannot be consumed by earlier MongoDB versions.

A 3.6 deployment can, however, use the BinData resume token returnedfrom a change stream opened against a collection from a deploymentwith fcv 3.6. However, a 3.6 deployment cannot use thehex-encoded string resume tokens.

mongo Shell Methods

MethodDescription
db.watch()Opens a change stream cursor for a single database(excluding admin, local, and config database) towatch for changes to all its non-system collections.For the corresponding MongoDB driver method, refer to yourdriver documentation.
Mongo.watch()Opens a change stream cursor for adeployment to watch for changes to all non-systemcollections across all databases except for admin,local, and config.For the corresponding MongoDB driver method, refer to yourdriver documentation.New in version 4.0.

Free Monitoring

MongoDB 4.0 (Community Edition) offers free Cloud monitoring for standalone or replica sets.

Enable/Disable

By default, you can enable/disable free monitoring during runtimeusing:

mongo Shell MethodsCommand
db.enableFreeMonitoring()db.disableFreeMonitoring()setFreeMonitoring

You can also enable or disable free monitoring at startup using either:

View Status

To view the state of your free monitoring, MongoDB provides thefollowing command and shell helper:

mongo Shell MethodsCommand
db.getFreeMonitoringStatus()getFreeMonitoringStatus

The serverStatus and the helperdb.getServerStatus() also includes free monitoring statisticsin the freeMonitoring field.

Access Control

To support free Cloud monitoring, MongoDB adds the following privilegeactions available for the cluster resource:

The built-in role clusterMonitor includes the new privilegeactions.

Sharded Clusters

mongos uses "majority" for thefollowing operations that affect the sharded cluster metadata:

CommandMethodNote
addShardsh.addShard()
createdb.createCollection()
dropdb.collection.drop()
dropDatabasedb.dropDatabase()Changed in MongoDB 3.6
enableShardingsh.enableSharding()
movePrimary
renameCollectiondb.collection.renameCollection()
shardCollectionsh.shardCollection()
removeShard
setFeatureCompatibilityVersion

.msi Installer on Windows

Starting in MongoDB 4.0, you can configure and start MongoDB as aservice during the install.

Platform Support

  • MongoDB 4.0 (Community & Enterprise) adds support for:
  • MongoDB 4.0 (Community) adds support for:
    • s390x RHEL 6.x
  • MongoDB 4.0 does not support SLES 11.
    • Support for SLES 11 has also been removed in MongoDB 3.2.20+,3.4.15+, and 3.6.4+.
  • MongoDB 4.0 does not support Ubuntu 12.04.
    • Support for Ubuntu 12.04 has also been removed in MongoDB 3.2.20+,3.4.15+, and 3.6.4+.
    • Support for Ubuntu 12.04 has also been removed in MongoDB 3.2.20+,3.4.15+, and 3.6.4+.
  • In future releases, MongoDB will end support for the followingplatforms:
    • Windows 7/2008R2
    • Windows 8/2012
    • Windows 8.1/2012R2
    • Ubuntu 14.04

Refer to Supported Platforms for the full platformsupport matrix.

MongoDB Tools

mongoreplay play supports a new MONGOREPLAY_HOSTenvironment variable that specifies the MongoDB connection string whenrunning mongoreplay play. The new environment vairable can be usedinstead of the command-line —hostoption.

For example, to play back a recording to a mongodinstance running with authentication mongodb1.example.net:27017, you can specify the connection string in:

  • The MONGOREPLAY_HOST environment variable:
  1. export MONGOREPLAY_HOST="mongodb://myUserName:s0meD1fficultPassw0rd@mongodb1.example.net:27017/?authSource=admin"
  2. mongoreplay play -p /some/path/to/my/recording.bson
  1. mongoreplay play -p /some/path/to/my/recording.bson --host "mongodb://myUserName:s0meD1fficultPassw0rd@mongodb1.example.net:27017/?authSource=admin"

If —host command-line option isspecified, the —host value overridesthe environment variable.

General Improvements

Commands

  • The command listCollections takes Intent Shared lock onthe database. In previous versions, the command takes Shared lock onthe database.
  • The command listCollections and its mongoshell helper db.getCollectionInfos() accepts the followingoption:
    • nameOnly to return only the collection names and types (whichdoes not require collection locks).
    • authorizedCollections to allow users without the requiredprivilege to run listCollections can run the command,with nameOnly: true, authorizedCollections: true, to return thethe collection(s) to which the user has privileges.
  • The command serverStatus and its mongoshell helper db.serverStatus() includesshardingStatistics in its output. TheshardingStatistics includes data on metadata refreshon sharded clusters.
  • The mongo shell helper db.collection.drop()accepts the write concern option.
  • For cursors created inside a session, you cannot callgetMore outside the session. Similarly, for cursorscreated outside of a session, you cannot call getMoreinside a session.
  • The command dbHash includes the following fields in itsoutput:
    • capped field that lists the capped collections
    • uuids field that contains the collections and theircorresponding UUIDs.
  • The command killOp now supports termination of queries that arerunning on a mongos. When run on the mongos, killOpcan kill queries that are running in more than one shard.

Geospatial Query Improvements

  • The geospatial query operators $near and$nearSphere now supports querying on sharded collections.
  • As of MongoDB 4.0, the $geoNear aggregation operator andgeoNear command support using the minDistance optionwith 2d indexes. Similarly, $near and$nearSphere support the $minDistance option for 2d indexes. Previously, minDistance and $minDistancewere only available for 2dsphere indexes.
  • MongoDB 4.0 adds a key option for the $geoNearaggregation operator and geoNear command that enablesusers to specify which geospatial index to use when querying acollection with multiple geospatial indexes. Previously, to use the$geoNear aggregation operator or geoNearcommand, the collection could only have one geospatial index.

Network Layer Improvements

Configuration Options

Miscellaneous

  • The JavaScript engine’s JIT compiler is now disabled by default.
  • Upgrades MozJS to ESR 45.9.0.
  • Adds RECOVERY component to log messages.
  • MongoDB 4.0 adds support for using the appName connectionstring option for setting a custom app name when connecting from themongo shell. Previously, only MongoDB drivers supportedusing the appName to set a custom value and themongo shell used the default MongoDB Shell value as theapp name.
  • Adds a mongo shell methodconvertShardKeyToHashed to return the hashed value for adocument.
  • Resolves localhost IP address as configured instead of assuming127.0.0.1.
  • When using the DNS Seedlist Connection Format to connect to themongo shell with authentication, themongo shell will now prompt the user toprovide their password when starting up.

Changes Affecting Compatibility

Some changes can affect compatibility and may require user actions. Fora detailed list of compatibility changes, seeCompatibility Changes in MongoDB 4.0.

Upgrade Procedures

Feature Compatibility Version

To upgrade, the 3.6 instances must havefeatureCompatibilityVersion set to 3.6. To check the version:

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

For specific details on verifying and setting thefeatureCompatibilityVersion as well as information on otherprerequisites/considerations for upgrades, refer to the individualupgrade instructions:

If you need guidance on upgrading to 4.0, MongoDB offers major versionupgrade servicesto help ensure a smooth transition without interruption to your MongoDB application.

Download

To download MongoDB 4.0, go to the MongoDB Download Center

See also

Known Issues in 4.0.3

    • WT-4018:
    • MongoDB 4.0 may lose data during unclean shutdowns on macOS 10.12.x and 10.13.x.

Known Issues in 4.0.2

    • WT-4018:
    • MongoDB 4.0 may lose data during unclean shutdowns on macOS 10.12.x and 10.13.x.
    • SERVER-35657:
    • Using multi-document transactions with a single-member replica setmay have significant performance impact. Single-member replica setsshould only be for testing/development purposes and are notrecommended for production use.

Note

Multi-document transactions performance on a single-memberreplica set are not indicative of performance on a replica setwith more than one member.

Known Issues in 4.0.1

    • WT-4018:
    • MongoDB 4.0 may lose data during unclean shutdowns on macOS 10.12.x and 10.13.x.
    • SERVER-35657:
    • Using multi-document transactions with a single-member replica setmay have significant performance impact. Single-member replica setsshould only be for testing/development purposes and are notrecommended for production use.

Note

Multi-document transactions performance on a single-memberreplica set are not indicative of performance on a replica setwith more than one member.

Known Issues in 4.0.0

Fixed in 4.0.1

    • WT-4018:
    • MongoDB 4.0 may lose data during unclean shutdowns on macOS 10.12.x and 10.13.x.
    • SERVER-35657:
    • Using multi-document transactions with a single-member replica setmay have significant performance impact. Single-member replica setsshould only be for testing/development purposes and are notrecommended for production use.

Note

Multi-document transactions performance on a single-memberreplica set are not indicative of performance on a replica setwith more than one member.

    • SERVER-35758:
    • The shell prompt in the mongo shell will cause anerror if you use the session associated with the global dbobject to run transactions.

Fixed in 4.0.1

Report an Issue

To report an issue, seehttps://github.com/mongodb/mongo/wiki/Submit-Bug-Reports forinstructions on how to file a JIRA ticket for the MongoDB server or oneof the related projects.