2.7.0.rc0
Pre-release
Pre-release
This preview of the upcoming 2.7.0 feature release of the Ruby driver has the following major new features:
- RUBY-1431 SDAM and Server Selection Spec Compliance. Large portions of SDAM code have been rewritten to bring the driver in compliance with published MongoDB driver specifications. No changes to applications using MongoDB are required, however applications should see the following benefits:
- Faster server selection (including during failover in replica sets)
- Faster client initialization
- Better concurrency as more I/O is now done in background threads
- Improved logging and diagnostics of server discovery, topology changes and removal of servers from topology
- Better resiliency to connection and authentication errors
- SDAM events are now published in a more consistent manner
- Monitoring connections no longer authenticate, lessening load on the cluster
- Topology and server description objects are no longer mutated in place, simplifying change tracking for applications/APM implementors
- Locks have been added to synchronize topology updates
- It is possible to wait for background monitoring threads to terminate when closing the client
- RUBY-1559 Unified URI Options. This adds support for a multitude of options in MongoDB URIs to the driver, in a way consistent with other MongoDB-maintained drivers.
- RUBY-1574 Convenient API for Transactions. This adds a
with_transaction
method to session objects to provide an easier way to retry operations in a transaction until they commit successfully.
The following minor improvements have also been made:
- RUBY-1470 Enable SNI on jruby where possible
- RUBY-1608 Implement functionality to enable/disable TLS hostname verification
- RUBY-1629 Sequence connection setup (e.g. auth) events before command events using the connection
The following bugs have been fixed:
- RUBY-1353 max_staleness does not work due to seconds / milliseconds mismatch
- RUBY-1433 OperationError#code not set on duplicate key error
- RUBY-1474 SDAM events are not published when server is marked unknown during handshake
- RUBY-1481 Handshake & auth exceptions may make connections permanently unusable
- RUBY-1550 Error::Parser fails to correctly handle writeErrors
- RUBY-1464 Time offset ignored in aggregation queries when using ActiveSupport::TimeWithZone
- RUBY-1507 isMaster response changing causes nil reference in the session pool
As well, a number of improvements have been made to tutorial and API documentation of the driver. Full list of fixed issues may be found here.
This version of the driver has been tested with Ruby 2.6.
Lacking major issues we expect to release 2.7.0 final in about a week.