This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
[Snyk] Upgrade mongodb from 3.3.4 to 3.5.5 #2016
Merged
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.
Snyk has created this PR to upgrade mongodb from 3.3.4 to 3.5.5.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.Release notes
Package name: mongodb
The MongoDB Node.js team is pleased to announce version 3.5.5 of the driver
Release Highlights
Regression in
hasNext
when using a cursor with a limit@peterbroadhurst helped point out a regression introduced in v3.5.4 where using
hasNext
on 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
topologyDescriptionChanged
topology eventsby introducing a
ServerDescription
equality operator. Since equality does not take thelastUpdateTime
andlastWriteDate
fields 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
ServerDescription
equality.Memory leaks with Node.js v12+
The legacy topology types (in particular if you were connected to a replic set) used a
custom
Timeout
class 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
undefined
variable.promiseLibrary
not respected by newly introducedmaybePromise
helper@TobyEalden pointed out that an internal refactor to use a helper to optionally
return a
Promise
for 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
The MongoDB Node.js team is pleased to announce version 3.5.4 of the driver
Release Highlights
Regression in
hasNext
when piping a cursorPierre Mallet and @Sintendo helped identify a regression with our cursors which did not
properly rewind a cursor when
hasNext
was called before the cursor was piped.Regression in server selection queue processing
A change introduced in v3.5.3 converted the server selection loop from a loop with timers
to a queue of callbacks. A subtle bug was introduced to the code to process the quere where
the upper bound of a for loop was using a dynamically decreasing length, leading to some
operations being ignored, and ultimately timing out. Many thanks to Frederic Maillasson,
@paulrobinson, and @adityapatadia for helping uncover this issue
Only ensure minimum connection pool size if a size is specified
User @millerick submitted a PR short circuiting the background task for ensuring a minimum
pool size if no minimum size was set.
Release Notes
Bug
Improvement
The MongoDB Node.js team is pleased to announce version 3.5.3 of the driver
Release Highlights
This patch release fixes one issue with command error handling during network errors, and one minor issue with multiple incoming wire messages not being properly processed.
Release Notes
Bug
Improvement
The MongoDB Node.js team is pleased to announce version 3.5.2 of the driver
Release Highlights
This patch release corrects a regression introduced in the 4.2 timeframe which would
effectively disable retryable operations for connection to MongoDB 4.2+. Additionally,
the server selection loop has been converted to a queue of callbacks to improve
readability, as well as performance in certain scenarios.
Release Notes
Bug
Improvement
The MongoDB Node.js team is pleased to announce version 3.5.1 of the driver
Release Highlights
This patch release fixes a few regressions introduced with new connection pool, primarily
around the ability to use custom TLS certificates.
Release Notes
Bug
The MongoDB Node.js team is pleased to announce version 3.5.0 of the driver
Release Highlights
CMAP-compliant Connection Pool
This release introduces a modern replacement for the driver's connection pool, available only with the
unified topology. A major effort was made in early 2019 to fully specifiy connection pools for MongoDB
drivers (see: CMAP specification), and this release brings the Node.js driver in line with that
specification.
Traceability
The new pool supports monitoring for all aspects of its behavior. This allows deep introspection into
the operation of the connection pool, as well as an ability to profile the lifetime of an operation
when used in conjunction with command monitoring.
Stream-first Connection Design
The
Connection
class was completely rewritten for the new pool adopting a stream-first mentality. Allwire message processing and compression is handled in a duplex stream called the
MessageStream
, andthat stream is connected bidirectionally to the underlaying TCP socket. The result is a connection which
gains the general benefit of streams: better performance, less memory pressure, backpressure support. It
also opens the possiblity of supporting non-TCP/UDP streams as a transport for the driver.
waitQueueTimeoutMS
The new connection pool has a concept of a "wait queue", which allows operation requests to buffer waiting
for a connection to execute against. There is no timeout by default, but users can now specify a new value
waitQueueTimeoutMS
in their connection string orMongoClient
options to proactively cancel operationsthat have waited too long.
Remember that the new connection pool is only available for the "Unified Topology", so remember to pass
useUnifiedTopology: true
to yourMongoClient
constructor to use it!Dedicated monitoring connection
Both the legacy and unified SDAM implementations have until now executed monitoring checks as priority
messages in the legacy Pool implementation. This means that monitoring (
ismaster
) operations wereprioritized over other queued operations, but also means that monitoring could be indefinitely blocked,
in particular during failover or black hole scenarios. The default socket timeout is
null
(read: Infinity),so if the pool was completely saturated with operations, there may be no ability to execute a monitoring
check and determine that the connection to a server was no longer valid. This version of the driver
introduces a new
Monitor
class which manages its own dedicated monitoring connection to each knownnode.
Server selection errors
In v3.3.0 of the driver we introduced a new
MongoTimeoutError
for all errors covered by the serverselection loop, leading to a spike in bug reports with a title similar to
Server selection timed out after 30000ms
.Even though the error type itself had an attached
reason
field, we still feel it was easy to miss whythe selection had failed. As a result we have introduced a new type
MongoServerSelectionError
whichwill use the originating error (
reason
) for its message, better informing users what caused aselection error, while still also conveying it is an error in server selection.
Release Notes
New Feature
Bug
Improvement
The MongoDB Node.js team is pleased to announce version 3.4.1 of the driver
Release Highlights
This is a patch release addressing two regressions introduced in bulk writes and SCRAM authentication.
Release Notes
Bug
The MongoDB Node.js team is pleased to announce version 3.4.0 of the driver
Release Highlights
Client Side Field Level Encryption (CSFLE)
The major functionality introduced in this release, and indeed the reason for the minor version bump, is full support for MongoDB's Client Side Field Level Encryption. The bulk of the support comes through an addon module mongodb-client-encryption, please refer to the reference documentation for more details.
TLS Option Variants
This release also introduces a number of new connection string options related to TLS. In order to unify uri options across all MongoDB drivers, and to better signal the technology the driver is actually using, all
ssl
related options now have a correspondingtls
variant. NOTE: your application will not break if you continue to use thessl
variants, but deprecation warnings will be introduced prior to the 4.x driver release.@adityapatadia initially pointed out that these
tls
variants had no effect, now they do. Thank you @adityapatadia!mongodb+srv
A critical bug was found by @ephemer with the recently introduced "mongos discovery", where a typo caused DNS polling to occur at very fast intervals.
Additionally, user @mpilar identified and fixed a bug with our
mongodb+srv
parsing, where user-provided client options were not overriding those provided by a TXT record lookup.Thank you very much @ephemer and @mpilar!
server selection
@adityapatadia also helped find a bug in the server selection code which rendered selection with a
nearest
read preference non-functional. Thanks again @adityapatadia!bulkWrite
A small bug was fixed causing errors in an unordered bulk write to be reported in incorrect order. If an error occurs in a bulk write now, then it will show up in the
writeErrors
field of the resultingBulkWriteError
with an index that corresponds to the position the operation had in the initial input.Release Notes
Bug
New Feature
Improvement
The MongoDB Node.js team is pleased to announce version 3.3.5 of the driver
Release Highlights
unified topology
This patch release includes additional fixes for the regression in the unified topology discovered in v3.3.2, expanding our testing infrastructure to include a simulated workload during failover testing. There was a bug when connecting to single-node replicasets which could result in a stack overflow which was corrected. Additionally, events and options which are incompatible with the unified topology will now emit a warning message.
mongodb+srv
The release also includes a fix submitted by @mpilar, who found an inconsistency in our implementation of the "Initial Seedlist Discovery" specification. An
authSource
specified in the options passed toMongoClient
would be overridden by anauthSource
provided in the TXT record checked during initial seedlist discovery over SRV. Thank you very much Miguel!bulkWrite
BulkWriteError
is now exported at the top level of the module so that users can catch them easily. Additionally, a fix was made to ensure that the index of operations passed into anunordered
bulk operation were preserved when reporting possible errors in the future.Release Notes
Bug
Improvement
The MongoDB Node.js team is pleased to announce version 3.3.4 of the driver
Release Highlights
This release primary consists of improvements to the "unified topology". In particular, a regression with interaction between the connection pool and topology could result in servers which "go away" (due to network error, for example) would not return, resulting in a
MongoTimeoutError
.Release Notes
Bug
Improvement
Commit messages
Package name: mongodb
Compare
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs