Releases: mongodb/node-mongodb-native
v3.6.6
The MongoDB Node.js team is pleased to announce version 3.6.6 of the driver
Release Highlights
This patch addresses a number of bugs listed below.
Most notably, for client side encryption users upgrading to this version of the driver along with the new version of [email protected] will alleviate the potential deadlock case if your connection pool was fully utilized. There will now be an internal MongoClient that will be used for metadata look ups (e.g, listCollections
) when the pool size is under certain constraints. The events generated from this client are forwarded to the client instance you initialize so it is possible to monitor all events.
Bug
- [NODE-2995] - Sharing a MongoClient for metadata lookup can lead to deadlock in drivers using automatic encryption
- [NODE-3050] - Infinite loop on Windows due to a bug in require_optional package
- [NODE-3120] - TypeError: Cannot read property 'roundTripTime' of undefined
- [NODE-3122] - Pipelining an upload stream of GridFSBucket never finishes on Node v14
- [NODE-3129] - Collection () .. .setReadPreference() not routing query to secondaries
- [NODE-3133] - autoEncryption produces serverHeartbeatFailed - with MongoError typemismatch
Improvement
- [NODE-3070] - Define error handling behavior of writeErrors and writeConcernError on Mongos
Documentation
- Reference: http://mongodb.github.io/node-mongodb-native/3.6
- API: http://mongodb.github.io/node-mongodb-native/3.6/api
- Changelog: https://github.com/mongodb/node-mongodb-native/blob/3.6/HISTORY.md
We invite you to try the driver immediately, and report any issues to the NODE project.
Thanks very much to all the community members who contributed to this release!
v4.0.0-beta.2
The MongoDB Node.js team is pleased to announce version 4.0.0-beta.2 of the driver
This release brings us closer to the RC release for the fully typescript enabled version 4.0.0 of the driver.
You can expect a full migration and detailed list of changes with the upcoming RC.
Breaking Changes
All Changes
- add FLE AWS sessionToken TypeScript definitions (#2737) (f4698b5)
- remove catch for synchronous socket errors and remove validation on nodejs option (#2746) (a516903)
- session support detection spec compliance (#2733) (1615be0)
- remove deprecated items (#2740) (ee1a4d3)
- remove enums in favor of const objects (#2741) (d52c00e)
Documentation
Reference: https://docs.mongodb.com/drivers/node
API: https://mongodb.github.io/node-mongodb-native/4.0
Changelog: https://github.com/mongodb/node-mongodb-native/blob/4.0/HISTORY.md
v3.6.5
The MongoDB Node.js team is pleased to announce version 3.6.5 of the driver!
Notable Fixes
In this patch there is a fix surrounding an issue some users were encountering in serverless environments when using the Unified Topology. If the nodejs process went unused for a great amount of time there was an intermittent issue that would cause startSession
to fail, however, issuing a dummy read request would resolve the problem. The session support check is now done after server selection meaning the driver has the most up to date information about the MongoDB deployment before utilizing sessions. We encourage any user's that implemented workarounds to updated their driver and make use of this fix.
In addition, the previous release of our driver added a warning about an upcoming change in the v4 version of the driver about how users can specify their write concern options. We've updated the driver to use nodejs's process.emitWarning
API in nearly all cases where the driver prints something out, as well as limit most warning messages to only be printed once.
Bug
- session support detection spec compliance (#2732) (9baec71)
- [NODE-3100] - startSession fails intermittently on servers that support sessions
- [NODE-3066] - Accessing non-existent property 'MongoError' of module exports inside circular dependency
- [NODE-3114] - Incorrect warning: Top-level use of w, wtimeout, j, and fsync is deprecated
- [NODE-3119] - Node 14.5.4, mongo 3.6.4 Circular warnings
v4.0.0-beta.1
Release Highlights
This beta release addresses a few bugs relating to using CSFLE with the beta version of the driver. As well as a fix for BulkWriteResult and BulkWriteError to correctly reflect the operation's result information.
You can take a look at the raw updates list in our HISTORY.md file, we are intending to do a complete rundown of features and fixes with the v4.0.0 release.
You can give it a try with:
npm install mongodb@beta
If you have any suggestions about clarifying documentation or if you run into any issues or have any feature ideas please let us know! You can make an account and submit tickets to our JIRA project here.
Documentation
Reference: https://docs.mongodb.com/drivers/node
API: https://mongodb.github.io/node-mongodb-native/4.0
Changelog: https://github.com/mongodb/node-mongodb-native/blob/4.0/HISTORY.md
v3.6.4
MongoDB Driver v3.6.4
The MongoDB Node.js team is pleased to announce version 3.6.4 of the driver
Release Highlights
Explain Support
The full set of $explain verbosity settings are now supported:
queryPlanner
queryPlannerExtended
executionStats
allPlansExecution
In the following commands:
aggregate()
(MDB 3.0+)find()
(MDB 3.0+)remove()
(MDB 3.0+)update()
(MDB 3.0+)distinct()
(MDB 3.2+)findAndModify()
(MDB 3.2+)mapReduce()
(MDB 4.4+)
You can get a lot of insight into the performance of a query or optimization using these fine grained reports.
To learn more about how to use explain read here.
Direct Connection Issue Revert
We removed automatic direct connection for the unified topology in the 3.6.3 release of the driver. This change was preparatory for the 4.0 version of the driver, where we'll always perform automatic discovery. To avoid making this kind of change in a patch release, this version restores automatic direct connection when connecting to a single host using the unified topology without a specified replicaSet and without directConnection: false, in line with previous 3.6 releases.
NOTE: In the next major version the
unifiedTopology
is the only Topology and it is required to either specify areplicaSet
name or enabledirectConnection
in order to connect to single nodes in a replica set.
Support Azure and GCP keystores in FLE
There are no functional changes to the driver to support using Azure and GCP keystores but a new mongodb-client-encryption release (v1.2.0) can be found here which prominently features support for these key stores.
Documentation
- Reference: http://mongodb.github.io/node-mongodb-native/3.6
- API: http://mongodb.github.io/node-mongodb-native/3.6/api
- Changelog: https://github.com/mongodb/node-mongodb-native/blob/3.6/HISTORY.md
We invite you to try the driver immediately, and report any issues to the NODE project.
Thanks very much to all the community members who contributed to this release!
Release Notes
Bug
- [NODE-2355] - GridFSBucketWriteStream doesn't implement stream.Writable properly
- [NODE-2828] - noCursorTimeout does not seem to for find()
- [NODE-2874] - Setting connectionTimeoutMS to 0 will result in a disconnection every heartbeatFrequencyMS
- [NODE-2876] - Race condition when resetting server monitor
- [NODE-2916] - Legacy topology hangs with unlimited socket timeout
- [NODE-2945] - ignoreUndefined not works on findOneAndUpdate when { upsert: true }
- [NODE-2965] - MongoClient.readPreference returns "primary" ignoring readPref from connection string
- [NODE-2966] - Unified topology: server selection fails when trying to connect to a remote replica set with a member whose 'host' attribute resolves to 'localhost'
- [NODE-2977] - Query parameters with path in connection string not working on windows
- [NODE-2986] - MongoError: pool destroyed
Features
- [NODE-2762] - Comprehensive Support for Explain
- [NODE-2852] - Add explain support to non-cursor commands
- [NODE-2853] - Add explain support to cursor-based commands
Improvement
- [NODE-1726] - Deprecate Topology events in
Db
- [NODE-2825] - Support Azure and GCP keystores in FLE
- [NODE-2880] - Improve stack traces in the session leak checker
- [NODE-2895] - Update AggregateCursor "unwind" method to match the native driver
- [NODE-2995] - Sharing a MongoClient for metadata lookup can lead to deadlock in drivers using automatic encryption
v4.0.0-beta.0
The MongoDB Node.js team is pleased to announce a beta version v4.0.0-beta.0 of the driver.
A major motivation for releasing this beta was the migration of the entire code base to TypeScript. While we took special care to ensure a smooth transition, we imagine such a dramatic change might reveal unexpected issues. This beta release makes it easy to easily check compatibility with your application and make use of the included type definitions.
Additionally, we are publishing an early version of the new API documentation https://mongodb.github.io/node-mongodb-native/4.0.
You can take a look at the raw updates list in our HISTORY.md file, we are intending to do a complete rundown of features and fixes with the v4.0.0 release.
You can give it a try with:
npm install mongodb@beta
If you have any suggestions about clarifying documentation or if you run into any issues or have any feature ideas please let us know! You can make an account and submit tickets to our JIRA project here.
Documentation
Reference: https://docs.mongodb.com/drivers/node
API: https://mongodb.github.io/node-mongodb-native/4.0
Changelog: https://github.com/mongodb/node-mongodb-native/blob/4.0/HISTORY.md
v3.6.3
The MongoDB Node.js team is pleased to announce version 3.6.3 of the driver
Release Highlights
MongoError: not master
when running createIndex
A regression introduced in v3.6.2 meant that createIndex
operations would not be executed with a fixed
primary read preference. This resulted in the driver selecting any server for the operation, which would
fail if a non-primary was selected.
Performance issues on AWS Lambda
The driver periodically monitors members of the replicaset for changes in the topology, but ensures that
the "monitoring thread" is never woken sooner than 500ms. Measuring this elapsed time depends on a
stable clock, which is not available to us in some virtualized environments like AWS Lambda. The result
was that periodically operations would think there were no available servers, and the driver would force
a wait of heartbeatFrequencyMS
(10s by default) before reaching out to servers again for a new
monitoring check. The internal async interval timer has been improved to account for these environments
GSSAPI AuthProvider reuses single kerberos client
A regression introduced in v3.6.0 forced the driver to reuse a single kerberos client for all
authentication attempts. This would result in incomplete authentication flows, and occaisionally even
a crash in the kerberos
module. The driver has been reverted to creating a kerberos client per
authentication attempt.
Performance regression due to use of setImmediate
A change introduced in v3.6.1 switched all our usage of process.nextTick
in the connection pool with
setImmediate
per Node.js core recommendation. This was observed to introduce noticeable latency when the event loop
was experiencing pressure, so the change was reverted for this release pending further investigation.
Community Contributions
- @jswangjunsheng submitted a fix for a rare scenario when wait queue members time out before connection establishment
- @through-a-haze submitted a fix for incorrect construction of an X509 authentication message
- @andreialecu helped us indicate peer optional dependencies in our
package.json
for stricter package managers (pnpm, yarn2)
Documentation
Reference: http://mongodb.github.io/node-mongodb-native/3.6/
API: http://mongodb.github.io/node-mongodb-native/3.6/api/
Changelog: https://github.com/mongodb/node-mongodb-native/blob/3.6/HISTORY.md
We invite you to try the driver immediately, and report any issues to the NODE project.
Thanks very much to all the community members who contributed to this release!
Release Notes
Bug
- [NODE-2172] - Change stream breaks on disconnection when there's something piped into it.
- [NODE-2784] - MongoError: Not Master when running createIndex in 3.6.0
- [NODE-2807] - MongoClient.readPreference always returns primary
- [NODE-2827] - Connecting to single mongos makes driver think it is connected to a standalone
- [NODE-2829] - MongoDB Driver 3.6+ Performance issues on AWS Lambda
- [NODE-2835] - Remove default timeout for read operations
- [NODE-2859] - GSSAPI AuthProvider causing crashes in Compass
- [NODE-2861] - Performance Regression for usage of mongodb connections (queries, inserts, ...)
- [NODE-2865] - Connections can be leaked if wait queue members are cancelled
- [NODE-2869] - Invalid assignment of X509 username makes authentication impossible
Improvement
v3.6.2
The MongoDB Node.js team is pleased to announce version 3.6.2 of the driver
Release Highlights
Updated bl
dependency due to CVE-2020-8244
See this link for more details: GHSA-pp7h-53gx-mx7r
Connection pool wait queue processing is too greedy
The logic for processing the wait queue in our connection pool ran the risk of
starving the event loop. Calls to process the wait queue are now wrapped in a
setImmediate
to prevent starvation
Documentation
Reference: http://mongodb.github.io/node-mongodb-native/3.6/
API: http://mongodb.github.io/node-mongodb-native/3.6/api/
Changelog: https://github.com/mongodb/node-mongodb-native/blob/3.6/HISTORY.md
We invite you to try the driver immediately, and report any issues to the NODE project.
Thanks very much to all the community members who contributed to this release!
Release Notes
Bug
v3.5.11
The MongoDB Node.js team is pleased to announce version 3.5.11 of the driver
Release Highlights
Kerberos
A bug in introducing the new CMAP Connection
prevented some users from properly
authenticating with the kerberos
module.
Updated bl
dependency due to CVE-2020-8244
See this link for more details: GHSA-pp7h-53gx-mx7r
Documentation
Reference: http://mongodb.github.io/node-mongodb-native/3.5/
API: http://mongodb.github.io/node-mongodb-native/3.5/api/
Changelog: https://github.com/mongodb/node-mongodb-native/blob/3.5/HISTORY.md
We invite you to try the driver immediately, and report any issues to the NODE project.
Thanks very much to all the community members who contributed to this release!
Release Notes
Bug
v3.6.1
The MongoDB Node.js team is pleased to announce version 3.6.1 of the driver
Release Highlights
Kerberos
A bug in introducing the new CMAP Connection
prevented some users from properly authenticating with the kerberos
module.
Index options are not respected with createIndex
The logic for building the createIndex
command was changed in v3.6.0 to use an allowlist rather than a blocklist, but omitted a number of index types in that list. This release reintroduces all supported index types to the allowlist.
Remove strict mode for createCollection
Since v3.6.0 createCollection
will no longer returned a cached Collection
instance if a collection already exists in the database, rather it will return a server error stating that the collection already exists. This is the same behavior provided by the strict
option for createCollection
, so that option has been removed from documentation.
Documentation
Reference: http://mongodb.github.io/node-mongodb-native/3.6/
API: http://mongodb.github.io/node-mongodb-native/3.6/api/
Changelog: https://github.com/mongodb/node-mongodb-native/blob/3.6/HISTORY.md
We invite you to try the driver immediately, and report any issues to the NODE project.
Thanks very much to all the community members who contributed to this release!
Release Notes
Bug
- [NODE-2731] - CMAP Connection type does not provide host/port properties
- [NODE-2755] - "language_override" option support for text index is broken