Releases: mongodb/mongo-ruby-driver
2.23.1
The MongoDB Ruby team is pleased to announce version 2.23.1 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new patch release in the 2.23.x series of MongoDB Ruby Driver.
Install this release using RubyGems via the command line as follows:
gem install -v 2.23.1 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.23.1'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
Bug Fixes
2.24.1
The MongoDB Ruby team is pleased to announce version 2.24.1 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new patch release in the 2.24.x series of MongoDB Ruby Driver.
Install this release using RubyGems via the command line as follows:
gem install -v 2.24.1 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.24.1'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
Bug Fixes
- RUBY-3831 Skip OpenTelemetry command spans for sensitive commands (PR)
- RUBY-3456 Suppress no-op SDAM debug log lines (PR)
New Features
RUBY-3602 Include server address in OperationFailure and BulkWriteError messages (PR)
- New
Mongo::Config.include_server_address_in_errorsflag (defaultfalse). Whentrue,Mongo::Error::OperationFailureandMongo::Error::BulkWriteErrormessages are suffixed with(on host:port)so users can identify which server produced the error. - Both
#messageand#to_srender the suffix, since it's baked into the string passed tosuperat construction.ResultCombineraccumulates unique addresses across split bulk batches so multi-server bulks produce(on h1:27017, h2:27017). - Default-off behavior is byte-identical to current. No breaking changes. Planned to stay opt-in (no default flip).
RUBY-3220 Add databaseName property to command events (PR)
- Sync
find.ymlfrom the command-logging-and-monitoring spec socommandSucceededEventandcommandFailedEventexpectations includedatabaseName. Schema bumped from 1.1 to 1.15. - The Ruby driver's event classes already exposed
database_nameonCommandStarted,CommandSucceeded, andCommandFailed, and the unified runner already supports assertingdatabaseNameon any command event — this change exercises that path through the unified spec tests.
2.24.0
The MongoDB Ruby team is pleased to announce version 2.24.0 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new minor release in the 2.x series of MongoDB Ruby Driver.
Install this release using RubyGems via the command line as follows:
gem install -v 2.24.0 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.24.0'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
New Features
-
Added support for MongoDB's Intelligent Workload Management (IWM) and ingress connection rate limiting features. The driver now gracefully handles write-blocking scenarios and optimizes connection establishment during high-load conditions to maintain application availability.
- Supported on all commands.
- Custom application retry logic may need to be adjusted to avoid retrying too long.
- Upgrade is recommended to avoid impacts of server changes related to overload errors.
- If not upgrading, custom application retry logic may need to be adjusted to handle higher rates of overload errors. See Overload Errors.
- Add URI option maxAdaptiveRetries to configure the maximum number of retries for operations that fail with a SystemOverloadedError (default: 2).
- Add URI option enableOverloadRetargeting to control whether retries of SystemOverloadedError will attempt to use a different server (default: false).
-
Added serverMonitoringMode option configures which server monitoring protocol to use. Valid modes are
"stream", "poll", or "auto". The default value is "auto":- With "stream" mode, the client use the streaming protocol when the server supports it or fall back to the polling protocol otherwise.
- With "poll" mode, the client use the polling protocol.
- With "auto" mode, the client behave the same as "poll" mode when running on a FaaS platform or the same as "stream" mode otherwise. The client detects that it's running on a FaaS platform via the same rules for generating the
client.envhandshake metadata field in theMongoDB Handshake spec.
-
RUBY-3381 RUBY-3640 Remove support for server versions 3.6 and 4.0 (PR)
Bug Fixes
2.23.0
The MongoDB Ruby team is pleased to announce version 2.23.0 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new minor release in the 2.x series of MongoDB Ruby Driver.
Install this release using RubyGems via the command line as follows:
gem install -v 2.23.0 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.23.0'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
New Features
RUBY-3612 OpenTelemetry (PR)
When the feature is enabled, Ruby driver traces driver operation and the corresponding server commands nested under the operation. Tracing can be enabled per Mongo::Client instance (by setting the tracing option to true), or globally via the OTEL_RUBY_INSTRUMENTATION_MONGODB_ENABLED environment variable.
RUBY-3552 and RUBY-3588 Deprecate support for server versions 3.6 and 4.0
Support for MongoDB server versions 3.6 and 4.0 is now deprecated, and will be removed in version 2.24.0 of the Ruby driver. If you are using MongoDB server version 4.0 or older, please upgrade to at least version 4.2.
Other New Features
- Add
csfle_convert_to_ruby_typesconfig option for converting encryption types (PR) - RUBY-3714 Client metadata capture for TruffleRuby (PR)
- RUBY-3519 Allow valid SRV hostnames with less than 3 parts (PR)
- Ruby 4.0 Support (PR)
Bug Fixes
2.22.0
The MongoDB Ruby team is pleased to announce version 2.22.0 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new minor release in the 2.x series of MongoDB Ruby Driver.
Install this release using RubyGems via the command line as follows:
gem install -v 2.22.0 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.22.0'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
New Features
Bug Fixes
2.20.2
The MongoDB Ruby team is pleased to announce version 2.20.2 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new patch release in the 2.20.x series of the MongoDB Ruby Driver.
Install this release using RubyGems via the command line as follows:
gem install -v 2.20.2 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.20.2'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
Bug Fixes
2.21.3
The MongoDB Ruby team is pleased to announce version 2.21.3 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new patch release in the 2.21.x series of the MongoDB Ruby Driver.
Install this release using RubyGems via the command line as follows:
gem install -v 2.21.3 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.21.3'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
Bug Fixes
2.21.2
The MongoDB Ruby team is pleased to announce version 2.21.2 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new patch release in the 2.21.x series of the MongoDB Ruby Driver.
Install this release using RubyGems via the command line as follows:
gem install -v 2.21.2 mongo
Or simply add it to your Gemfile:
gem 'mongo', '2.21.2'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
Bug Fixes
2.21.1
Version 2.21.1 of the MongoDB Ruby Driver is now available. This is the latest patch release in the 2.21 series.
Install it via RubyGems at the command line:
$ gem install -v 2.21.1 mongo
Or via Bundler, in a Gemfile:
gem 'mongo', '2.21.1'
It adds the following new feature:
- RUBY-3395 Adds support for
vectorSearchsearch indexes, by adding atype:parameter to the#create_onemethod. (PR)
The following minor changes were made:
- RUBY-1933 Adds some debug-level logging around the initial DNS seed list query, to help when troubleshooting network issues (PR)
- RUBY-3299 Slight performance improvement for decrypting documents with a large number of encrypted fields (PR)
- RUBY-3429 Transient KMS errors are now retried. (PR)
It also includes the following bug fixes:
- RUBY-2467 Fixes a warning while installing the gem, caused by a missing subdirectory. Fixed by removing all specs from the generated gem; if you need the specs, please check out the repository. (PR)
- RUBY-3604 Fix a race condition in the authentication flow that could cause authentication to fail incorrectly when multiple simultaneous threads are attempting to authenticate. (PR by @jteich)
- RUBY-3658 When a timeout is specified on the client, database, or operation, partial writes to the server are never completed, resulting in timeouts. (PR)
Full Changelog: v2.21.0...v2.21.1
2.21.0
Version 2.21.0 of the MongoDB Ruby Driver is now available.
Release Highlights
- RUBY-2523: Introducing "Client-Side Operations Timeout" (CSOT). Most timeout-related options have been deprecated and unified under a single, new
timeout_msoption. Deprecated options includesocket_timeout,wait_queue_timeout,wtimeout,max_time_ms, andmax_commit_time_ms. - RUBY-3503: Bump maxWireVersion for server 8.0 support.
- RUBY-3392 and RUBY-3457: Support for range v2 queries with queryable encryption, including a new
trim_factorparameter. - RUBY-3463: Fixed connection issues in load-balanced topologies caused by cursors incorrectly releasing the connection between operations.
Documentation
Documentation is available at MongoDB.com.
Installation
You may install this version via RubyGems, with:
gem install --version 2.21.0 mongo
What's Changed
- RUBY-3414 Re-enable serverless by @comandeo-mongo in #2885
- DOP-4704: Remove docs/ directory that has been moved to docs-ruby by @i80and in #2883
- RUBY-3514 pointer to docs by @adviti-mishra in #2888
- RUBY-3503 Bump the max wire version from 21 to 25 for server 8.0 compatibility by @adviti-mishra in #2887
- RUBY-2523 Client Side Operations Timeout by @comandeo-mongo in #2882
- RUBY-3463 Fix cursor behaviour on load balanced by @comandeo-mongo in #2893
- RUBY-3392 Support QE Range v2 by @comandeo-mongo in #2894
- RUBY-3544 prepare for 2.21.0 by @jamis in #2895
New Contributors
- @i80and made their first contribution in #2883
- @adviti-mishra made their first contribution in #2888
Full Changelog: v2.20.1...v2.21.0