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 events
by introducing a ServerDescription
equality operator. Since equality does not take the
lastUpdateTime
and lastWriteDate
fields of an ismaster into account, the driver could
eventually 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 driver
thinking 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 introduced maybePromise
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 custom
promise library if one was provided!
Thanks very much to all the community members who contributed to this release!
Release Notes
Bug
- [NODE-2460] - Memory Leak with ReplSet and NodeJS v12
- [NODE-2472] - TypeError on server available with useUnifiedTopology: true
- [NODE-2474] - Server_Description update with lastUpdateTime / lastWriteDate fields is ignored in topology
- [NODE-2480] - TypeError after reconnecting
- [NODE-2483] - Regression using hasNext on cursor with limit
- [NODE-2490] - promiseLibrary option is not honoured