Update dependency mongodb to v3.6.6 - autoclosed #60
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.1.13->3.6.6By merging this PR, the issue #26 will be automatically resolved and closed:
Release Notes
mongodb/node-mongodb-native (mongodb)
v3.6.6Compare Source
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 mongodb-client-encryption@1.2.3 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
Improvement
Documentation
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!
v3.6.5Compare Source
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
startSessionto 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.emitWarningAPI in nearly all cases where the driver prints something out, as well as limit most warning messages to only be printed once.Bug
v3.6.4Compare Source
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:
queryPlannerqueryPlannerExtendedexecutionStatsallPlansExecutionIn 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.
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
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
Features
Improvement
Dbv3.6.3Compare Source
The MongoDB Node.js team is pleased to announce version 3.6.3 of the driver
Release Highlights
MongoError: not masterwhen runningcreateIndexA regression introduced in v3.6.2 meant that
createIndexoperations would not be executed with a fixedprimary 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 newmonitoring 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
kerberosmodule. The driver has been reverted to creating a kerberos client perauthentication attempt.
Performance regression due to use of
setImmediateA change introduced in v3.6.1 switched all our usage of
process.nextTickin the connection pool withsetImmediateper Node.js core recommendation. This was observed to introduce noticeable latency when the event loopwas experiencing pressure, so the change was reverted for this release pending further investigation.
Community Contributions
package.jsonfor 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
Improvement
v3.6.2Compare Source
The MongoDB Node.js team is pleased to announce version 3.6.2 of the driver
Release Highlights
Updated
bldependency due to CVE-2020-8244See 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
setImmediateto prevent starvationDocumentation
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.6.1Compare Source
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
Connectionprevented some users from properly authenticating with thekerberosmodule.Index options are not respected with
createIndexThe logic for building the
createIndexcommand 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
createCollectionSince v3.6.0
createCollectionwill no longer returned a cachedCollectioninstance 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 thestrictoption forcreateCollection, 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
Improvement
v3.6.0Compare Source
The MongoDB Node.js team is pleased to announce version 3.6.0 of the driver
NOTE: This version begins our official support for MongoDB 4.4
Release Highlights
Streaming topology changes
MongoDB drivers maintain a local view of the topology they are connected to, and ensure the accuracy of that view by polling connected nodes on average every ~10s. In MongoDB 4.4, drivers are now able to receive push notifications about topology updates, effectively reducing the time for client recovery in failover scenarios to the time it takes for the server to make the election and report the outcome.
This feature is enabled by default when connecting to MongoDB 4.4, no changes are needed for user code.
Authentication
MONGODB-AWS authentication mechanism
The MONGODB-AWS authentication mechanism uses your Amazon Web Services Identity and Access Management (AWS IAM) credentials to authenticate users on MongoDB 4.4+. Please read more about this new authentication mechanism in our documentation.
Performance improvements
There were two projects to transparently improve performance of authentication in MongoDB 4.4:
A driver can now include the first
saslStartcommand in its initial handshake with server. This so-called "speculative authentication" allows us to reduce one roundtrip to the server for authentication a connection. This feature is only support for X.509, SCRAM-SHA-1 and SCRAM-SHA-256 (default) authentication mechanisms.The SCRAM conversation between driver and server can now skip one of it's empty exchanges which also serves to reduce the roundtrips during a SCRAM authentication.
Changes in behavior of
Db.prototype.createCollectionThe
createCollectionhelper used to internally run alistCollectionscommand in order to see if a collection already existed before running the command. If it determined a collection with the same name existed, it would skip running the command and return an instance ofCollection. This behavior was changed in v3.6.0 to avoid potentially serious bugs, specifically that the driver was not considering options passed intocreateCollectionas part of the collection equality check. Imagine the following scenario:The
createCollectioncall which defines a JSON schema validator would be completely bypassed because of the existence ofbar, which was implicitly created in the first command. Our policy is strictly adhere to semver, but in rare cases like this where we feel there is potential for a data corrupting bug, we make breaking behavioral changes to protect the user.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
Epic
New Feature
Improvement
Bug
v3.5.11Compare Source
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
Connectionprevented some users from properlyauthenticating with the
kerberosmodule.Updated
bldependency due to CVE-2020-8244See 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.5.10Compare Source
The MongoDB Node.js team is pleased to announce version 3.5.10 of the driver
NOTE: This will be the final release in the 3.5.x branch, please consider upgrading to 3.6.0
Release Highlights
TypeError: Cannot read property 'documents' of null
@adrian-gierakowski helped us identify a bug with our ChangeStreamCursor, specifically when the cursor
was complete it would not return a valid document but instead a
nullvalue.Command helper not respecting server selection specification rules
The server selection specification indicates that the "runCommand" helper should act
as a read operation for the purposes of server selection, and that it should use a default read
preference of "primary" which can only be overridden by the helper itself. The driver had a bug
where it would inherit the read preference from its "parent" type (
Collection,Db,MongoClient)which is at odds with the specified behavior.
mongodb+srvinvalid IPv6 supportDue to a bug in how we referred to ipv6 addresses internal to the driver, if a
mongodb+srvconnection string was provided with an ipv6 address the driver would never be able to connect
and would result in a the following error
RangeError: Maximum call stack size exceeded.maxStalenessSecondsnot accepted when provided via optionsThere was a bug in our connection string and
MongoClientoptions parsing where a value providedfor
maxStalenessSecondswould not end up being reflected in theReadPreferenceused internalto the driver.
Sessions are prohibited with unacknowledged writes
MongoDB can provide no guarantees around unacknowledged writes when used within a session. The
driver will now silently remove the
lsidfield from all writes issued with{ w: 0 }, andwill return an error in these situations in the upcoming 4.0 major release.
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
Improvement
v3.5.9Compare Source
The MongoDB Node.js team is pleased to announce version 3.5.9 of the driver
Release Highlights
Use duration of handshake if no previous roundTripTime exists
The default
roundTripTimeof aServerDescriptionis -1, which means if that value is used we can potentially calculate a negativeroundTripTime. Instead, if no previousroundTripTimeexists, we use the duration of the initial handshake.the options [maxIdleTimeMS] is not supported
A number of new options were added when the CMAP compliant connection pool was introduced in 3.5.x. Unfortunately, these options were not documented properly. Now they are mentioned in the
MongoClientdocumentation, with a notice that they are only supported with the unified topology.TypeError: Reduce of empty array with no initial value
A fix in 3.5.8 which ensured proper filtering of servers during server selection exposed an issue in max staleness calculations when the topology type is
ReplicaSetNoPrimaryand no servers are currently known. In order to estimate an upper bound of max staleness when there is no primary, the most stale known server is known to compare the others to - if there are no known servers, you can't reduce the array!Server monitoring is prevented under heavy request load
In certain very high load fail-over scenarios the driver is unable to reschedule a monitoring check in order to update its view of the topology for retryability. This would result in a high number of failed operations, as they were unable to determine a new viable server.
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
Improvement
v3.5.8Compare Source
The MongoDB Node.js team is pleased to announce version 3.5.8 of the driver
Release Highlights
Fixes for NEAREST latency window calculation
@adityapatadia helped uncover an issue with our server selection logic which
filtered out servers after evaluating whether they were in the latency window.
This meant that non-viable servers were considered during the window calculation
and would render certain viable servers unviable.
BulkWriteError
writeErrorsproperty@vkarpov15 submitted a patch to always include
writeErrorson aBulkWriteError.We have logic to set the
messageofBulkWriteErrorto the message of the firsterror encountered if there is only one error. Unfortunately, this logic removed
the
writeErrorsfield when doing that, so users could be faced with an errorwhich conditionally changed shape.
Memory leak in timed out wait queue members
@dead-horse identified a memory leak in the new connection pool where wait queue
members which timed out might be left in the queue indefinitely under sufficient
load. The fix here was to ensure that all wait queue members are flushed during
wait queue processing before evaluating whether there were available sockets to
process new requests.
Implicit sessions cleanup improvements
Once @dead-horse was able to patch the connection pool memory leak, they also
identified a edge case where implicit sessions could be leaked in a very specific
error condition. The logic to release implicit sessions was simplified, preventing
this from happening in the future
Unordered bulk writes continue-on-error
A bug introduced last summer prevented unordered bulk write operations from
continuing after the first write error - one of the most important features of
being an unordered operation. We now properly support this feature again.
journalin connection string is ignored@nknighter filed a report that the
journaloption was ignored when providedvia the connection string. The paramater
jwas supported both through theconnection string and explicit added to
MongoClientoptions, but the officialdocumentation for connection strings support a
journaloption.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
Task
Improvement
v3.5.7Compare Source
The MongoDB Node.js team is pleased to announce version 3.5.7 of the driver
Release Highlights
Warning: Accessing non-existent property 'count' of module exports inside circular dependency
Work earlier this year left some dead code in our operations code, resulting in this warning message reported by multiple users. While we still have a few cycles in our codebase yet, this will quiet Node.js 14's circular dependency warnings.
Sessions are only acquired when operations are executed
Drivers use an implicit session for all operations where an explicit session is not provided. A subtle bug was introduced when session support was implemented where implicit sessions were created and assigned to operations even if they were about to sit in a queue waiting for execution. This results in the driver creating many sessions rather than reusing pooled ones. The fix is to ensure a session is only checked out of the pool when the operation is about to be written to a server.
Thanks very much to all the community members who contributed to this release!
Release Notes
Bug
Improvement
v3.5.6Compare Source
The MongoDB Node.js team is pleased to announce version 3.5.6 of the driver
Release Highlights
Regression in
mapwhen cursor used as a stream@dobesv helped identify a regression where a map function would be applied twice
if defined on a cursor, and that cursor was used to stream data.
TypeError: Cannot read property 'code' of undefined
User @linus-hologram originally reported an issue with a TypeError when the lambda
passed to the
withTransactionhelper rejected with anullvalue. @vkarpov15submitted the fix.
readPreferenceTagsinterpreted as an arrayA bug was fixed where
readPreferenceTagswith a single value in the connectionstring was not properly interpreted as an array of tags. This prevented the
Use Analytics Nodes to Isolate Workload guidance from working
correctly.
Cannot set property 'isDirty' of null
User @sean-daley reported seeing this in an AWS Lambda environment, but has proven to
be somewhat of a heisenbug. We are rolling out a fix here that ensures sessions
(implicit or not) are not used after they have been explicitly ended.
Thanks very much to all the community members who contributed to this release!
Release Notes
Bug
v3.5.5Compare Source
The MongoDB Node.js team is pleased to announce version 3.5.5 of the driver
Release Highlights
Regression in
hasNextwhen using a cursor with a limit@peterbroadhurst helped point out a regression introduced in v3.5.4 where using
hasNexton a cusor with a limit would not return the full set of results.
Ignored topology updates cause servers to fall out of latency window
A change introduced across all MongoDB drivers, and in particular v3.5.0 of the Node.js
driver, attempted to prevent needless duplicate
topologyDescriptionChangedtopology eventsby introducing a
ServerDescriptionequality operator. Since equality does not take thelastUpdateTimeandlastWriteDatefields of an ismaster into account, the driver couldeventually consider servers non-suitable for server selection, since they would fall out
of the latency window.
All updates are considered viable for topology updates now, and only event emission is
gated by
ServerDescriptionequality.Memory leaks with Node.js v12+
The legacy topology types (in particular if you were connected to a replic set) used a
custom
Timeoutclass to wrap a timer. Unfortunately, the class depended on an undocumented,private variable
_called, which was removed in Node.js v12. This would lead to the driverthinking the timeout never occurred, and therefore never releasing the object for garbage
collection. We recommend users of the legacy topology types immediately update to this
version of the driver, or use the Unified Topology which is unaffected by this bug.
TypeError: Cannot read property 'Symbol(cancelled)' of undefined
@erfanium and @Paic helped us identify an issue in rare failover events where multiple
requests to process the server selection queue would result in an attempted property
access of an
undefinedvariable.promiseLibrarynot respected by newly introducedmaybePromisehelper@tobyealden pointed out that an internal refactor to use a helper to optionally
return a
Promisefor top level API methods was not, in fact, using a custompromise library if one was provided!
Thanks very much to all the community members who contributed to this release!
Release Notes
Bug
v3.5.4Compare Source
Bug Fixes
STATE_CLOSINGbefore draining waitQueue (494dffb)hasNexton cursor (bb359a1)Features
v3.5.3Compare Source
Bug Fixes
Features
v3.5.2Compare Source
Bug Fixes
v3.5.1Compare Source
Bug Fixes
secureConnectfor tls connections (f8bdb8d)ssl=true(c8d182e)v3.5.0Compare Source
Bug Fixes
ssloption to pool connection options (563ced6)updateRsFromPrimary(95a772e)connectTimeoutMS(c83af9a)timeoutevent (5319ff9)