MongoDB Node.js Driver 3.6.3 Released

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)


Reference: MongoDB Node.js Driver
API: Index

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!