Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mongodb to the latest version 馃殌 #77

Closed
wants to merge 1 commit into from

Conversation

greenkeeper[bot]
Copy link
Contributor

@greenkeeper greenkeeper bot commented Jan 16, 2020

The devDependency mongodb was updated from 3.4.1 to 3.5.0.

This version is not covered by your current version range.

If you don鈥檛 accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.


Publisher: mbroadst
License: Apache-2.0

Release Notes for v3.5.0

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. All
wire message processing and compression is handled in a duplex stream called the MessageStream, and
that 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 or MongoClient options to proactively cancel operations
that have waited too long.

Remember that the new connection pool is only available for the "Unified Topology", so remember to pass
useUnifiedTopology: true to your MongoClient constructor to use it!

Dedicated monitoring thread

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 were
prioritized over other queued operations, but also means that monitoring could be indefinitely blocked,
in particular during failover or blackhole 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 socket to each known
node.

Server selection errors

In v3.3.0 of the driver we introduced a new MongoTimeoutError for all errors covered by the server
selection 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 why
the selection had failed. As a result we have introduced a new type MongoServerSelectionError which
will use the originating error (reason) for its message, better informing users what caused a
selection error, while still also conveying it is an error in server selection.

Release Notes

New Feature

  • [NODE-1742] - Implement Connection Monitoring and Pooling spec
  • [NODE-2386] - Use a dedicated monitoring thread

Bug

  • [NODE-2400] - Synchronous errors are swallowed by executeOperation
  • [NODE-2417] - Server descriptions with me mismatch from primary response should be removed
  • [NODE-2418] - client platform not sent in metadata for CMAP connections

Improvement

  • [NODE-1619] - Remove wasteful empty Buffer allocations in `Connection`
  • [NODE-2049] - Add "connectionError" as a valid "reason" for a ConnectionCheckOutFailedEvent when connection set up fails
  • [NODE-2397] - Make server selection errors more informative
  • [NODE-2402] - Integrate CMAP connection pool into unified topology
  • [NODE-2419] - Improve traceability of CMAP events
  • [NODE-2033] - Ignore ConnectionReadyEvent in CMAP pool creation test
Commits

The new version differs by 131 commits.

  • 8991285 chore(release): 3.5.0
  • ea56625 chore: waitQueueTimeoutMS is a valid connection string option
  • a630389 refactor: wait until server destroyed before stopping event relay
  • c04a520 doc: add basic documentation for CMAP event monitoring
  • c01bf50 refactor: don't encode type name into public CMAP event types
  • 1aea4de feat: relay all CMAP events to MongoClient
  • ed8c9d4 refactor: warn on use of deprecated SDAM events in unified mode
  • 7e64df7 test: reduce flakiness of objectid test which checks by time
  • 0715a36 doc: add documentation for CMAP events and errors
  • 9bd360c feat: include connectionId for APM with new CMAP connection pool
  • 9541410 test: ignore ismaster events in change streams spec tests
  • ec3d87b test: allow all test files to use custom chai mongodb spec matcher
  • 35d0274 fix: report the correct platform in client metadata
  • c528a66 Revert "fix: remove servers with me mismatch in updateRsFromPrimary"
  • 903208f Revert "test: include auth information in generated test connection string"

There are 131 commits in total.

See the full diff


FAQ and help

There is a collection of frequently asked questions. If those don鈥檛 help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper bot 馃尨

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.625% when pulling 8e5ae37 on greenkeeper/mongodb-3.5.0 into 32eb2e2 on master.

greenkeeper bot added a commit that referenced this pull request Jan 17, 2020
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Jan 17, 2020

  • The devDependency mongodb was updated from 3.4.1 to 3.5.1.

Update to this version instead 馃殌

greenkeeper bot added a commit that referenced this pull request Feb 12, 2020
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Feb 12, 2020

  • The devDependency mongodb was updated from 3.4.1 to 3.5.3.

Update to this version instead 馃殌

greenkeeper bot added a commit that referenced this pull request Feb 27, 2020
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Feb 27, 2020

  • The devDependency mongodb was updated from 3.4.1 to 3.5.4.

Update to this version instead 馃殌

greenkeeper bot added a commit that referenced this pull request Mar 11, 2020
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Mar 11, 2020

  • The devDependency mongodb was updated from 3.4.1 to 3.5.5.

Update to this version instead 馃殌

greenkeeper bot added a commit that referenced this pull request Apr 14, 2020
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Apr 14, 2020

  • The devDependency mongodb was updated from 3.4.1 to 3.5.6.

Update to this version instead 馃殌

greenkeeper bot added a commit that referenced this pull request Apr 29, 2020
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Apr 29, 2020

  • The devDependency mongodb was updated from 3.4.1 to 3.5.7.

Update to this version instead 馃殌

@greenkeeper greenkeeper bot closed this May 12, 2020
@greenkeeper greenkeeper bot deleted the greenkeeper/mongodb-3.5.0 branch May 12, 2020 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant