Releases: mongodb/mongo-ruby-driver
2.18.2
This patch release in the 2.18 series adds the following new features:
- RUBY-1253 Cursor iteration should complete abnormally when another thread closes the cursor
- RUBY-3187 Permit tlsDisableOCSPEndpointCheck in KMS TLS options
The following issues have also been addressed:
2.18.1
This patch release in the 2.18 series adds the following new feature:
The following issues have also been addressed:
2.18.0
This feature release of the Ruby driver supports MongoDB version 6.0. It includes the following new features:
- Added support for queryable encryption.
- Added support for Azure Key Vault, Google Cloud Key Management, and any KMIP compliant Key Management System to be used as master key storage for client side encryption.
- It is now possible to provide the path to a schema map file instead of the entire schema map as an object.
- The driver now implements the feature flag mechanism for incompatible changes and bug fixes. Changes gated behind feature flags for 2.18 are passing view filter and options to aggregate and validation of correct usage of update vs replace methods, as described below.
- Added the validate_update_replace feature flag which validates the parameters to update and replace operations. If this flag is turned on, an error will be raised on an invalid update or replacement document.
- Added the broken_view_options feature flag which allows the view options to be correctly propagated to the aggregate, count, count_documents, distinct, and estimated_document_count mehods. When this flag is switched on, the view options will be ignored in those methods.
- The driver now permits inserting documents with dollar-prefixed and dotted keys.
- CRUD methods, methods for listing databases, collection, and indexes management methods now support a new option :comment. This option enables users to specify an arbitrary comment to help trace the operation through the database profiler, currentOp and logs.
- The estimated_document_count method is now using the count server command instead of $collStats` aggregation pipeline stage, to support operation on views. Applications using the Stable API should upgrade to server versions 5.0.8 (if using MongoDB 5.0) or 5.3.2 (if using MongoDB 5.1/5.2/5.3) or newer to use the count command when API strict is enabled, or avoid setting api_strict: true when constructing Mongo::Client instances with server versions 5.0.0-5.0.7 and 5.1.0-5.3.1.
- The DBRef class has been moved to bson-ruby. For backwards compatibility, BSON::DBRef is aliased as Mongo::DBRef. The BSON::DBRef class derives from BSON::Document, unlike the legacy Mongo::DBRef which derived from Object. BSON::DBRef retains all attributes passed into its constructor, unlike Mongo::DBRef which only allowed $ref, $id, and $db. BSON::DBRef also reorders the fields if necessary to place $ref, $id, and $db first, in that order, as required by the MongoDB server.
- BulkWrite::Result class now has the acknowledged? attribute.
- Providing an empty array of operations to the bulk write is now an error.
- BSON serialization performance has been improved.
- ActiveJob middleware was added to the query cache.
- :authorized_collections options is recognized when listing collections.
- :wildcard_projection option was added to the allowed index specification.
- Added :srv_max_hosts/srvMaxHosts Ruby and URI options to limit how many mongos routers the driver will establish connections to.
- Custom SRV service names are now supported with the :srv_service_name Ruby option and the srvServiceName URI option.
- When 0 is given as the max connection pool size, it is now interpreted to mean no limit.
- The default maximum connection pool size has been increased to 20 from 5.
The following minor improvements were made:
The following issues were addressed:
- RUBY-2972 Calling find_one_and_* methods with write_concern 0 causes an error
- RUBY-2923 Slow spawn of mongocryptd
- RUBY-2961 Zero & negative limits not emulated correctly by QueryCache
- RUBY-1869 watch methods unaffected by :max_await_time_ms
- RUBY-2869 ruby 3.1.0: finalizer can't synchronize using mutexes
- RUBY-2990 Terminate push monitor when it fails
2.17.2
This patch release in the 2.17 series fixes the following issues:
2.16.3
This patch release in the 2.16 series fixes the following issues:
2.18.0.beta1
This beta release of the Ruby driver supports MongoDB version 5.2 and 6.0. This release can be used for early testing of new features, but are not suitable for production deployments.
Please note that MongoDB 6.0 binaries are currently available only as release candidates. Release candidates can be used for early testing of new features, but are not suitable for production deployments.
This release includes the following new features:
- Added support for queryable encryption.
- Added support for Azure Key Vault, Google Cloud Key Management, and any
KMIP compliant Key Management System to be used as master key storage for
client side encryption.
Following issues were also implemented or fixed:
- RUBY-2922 Use the count command instead of collStats to implement estimatedDocumentCount
- RUBY-2909 Snapshot Query Examples for the Manual
- RUBY-2682 Specify 5.0 cursor behaviour
- RUBY-2920 "ChangeStream Spec: fullDocument field in ChangeStreamOptions should be an optional to handle ""default"" case."
- RUBY-2766 Allow hint for unacknowledged writes using OP_MSG when supported by the server
- RUBY-2746 Provide options to limit number of mongos servers used in connecting to sharded clusters
- RUBY-2736 Add server connectionId to command monitoring events
- RUBY-2528 Permit inserting dollar-prefixed or dotted keys
- RUBY-2525 Expose the Reason an Operation Fails Document Validation
- RUBY-2737 Allow custom service names with srvServiceName URI option
- RUBY-2990 Terminate push monitor when it fails
- RUBY-2973 Add the acknowledged? field to the BulkWrite::Result class
- RUBY-2966 QueryCache: Add ActiveJob wrapper
- RUBY-2845 JRuby 9.3 Support
- RUBY-2969 Always report 'wallTime' in the change stream event output
- RUBY-2959 Clustered Indexes for all Collections
- RUBY-2956 Make allowDiskUse opt-out rather than opt-in in 6.0
- RUBY-2891 Change streams support for user-facing PIT pre- and post-images
- RUBY-2822 Add support for the comment field to all helpers
- RUBY-2814 Support authorizedCollections option for listCollections helpers
- RUBY-2742 "Remove OP_KILL_CURSORS, OP_INSERT, OP_UPDATE, OP_DELETE implementations + tests"
- RUBY-2715 Document Time-Series Collections
- RUBY-2480 to_bson getting called 6 times on a collection insert
- RUBY-2443 Adjust batch size based on limit & remaining # of documents
- RUBY-2090 Move driver DBRef class to bson-ruby
- RUBY-2834 Rails 7 Support
- RUBY-2590 Driver Handling of DBRefs
- RUBY-2978 Ruby 3.1: Synchronize can't be called from trap context
- RUBY-2972 Calling find_one_and_* methods with write_concern 0 causes an error
- RUBY-2923 Slow spawn of mongocryptd
- RUBY-3009 Update min_pool_size documentation for population
- RUBY-2961 Zero & negative limits not emulated correctly by QueryCache
- RUBY-2996 Implement update and replace validation
- RUBY-2869 ruby 3.1.0: finalizer can't synchronize using mutexes
- RUBY-2843 count_documents is not documented/tested to take session option
2.17.1
This bug fix release in the 2.17 series repairs the following issues:
2.16.2
This bug fix release in the 2.16 series repairs a regression manifesting in Mongoid when using map_reduce and passing read preference:
2.17.0
This feature release of the Ruby Driver adds support for MongoDB server 5.1.
This release includes the following new features:
- RUBY-2524 Snapshot reads. Added new readConcern level "snapshot" (non-speculative) for read commands outside of transactions, including on secondaries.
- RUBY-2526 Support $merge and $out executing on secondaries
- RUBY-2659 Support 'let' option for aggregate command
- RUBY-2821 Support 'let' option for CRUD commands
This release removes support for Ruby versions 2.3 and 2.4. The minimal required Ruby version is now 2.5. Read more about this change here.
This release also removes support for MongoDB versions older than 3.6. Read more about this change here.
The following bugs were fixed:
The following non-breaking changes were made:
2.16.1
This is a patch release in the 2.16 series.
The following bugs were fixed:
The following non-breaking changes were made: