Skip to content

Releases: mongodb/mongo-ruby-driver

2.24.0

20 Apr 16:13
f68d676

Choose a tag to compare

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.env handshake metadata field in the MongoDB Handshake spec.
  • RUBY-3381 RUBY-3640 Remove support for server versions 3.6 and 4.0 (PR)

Bug Fixes

2.23.0

04 Feb 17:30
1708c3d

Choose a tag to compare

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_types config 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

24 Nov 21:28
0b3078e

Choose a tag to compare

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

  • RUBY-3520 Sort option for updateOne and replaceOne (PR)

Bug Fixes

2.20.2

20 Aug 16:21
ee03e8f

Choose a tag to compare

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

  • RUBY-3694 Use correct CA when verifying OCSP endpoint (PR)

2.21.3

19 Aug 17:36
d0cd1ac

Choose a tag to compare

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

  • RUBY-3694 Use correct CA when verifying OCSP endpoint (PR)

2.21.2

15 Jul 18:21
17f8c4a

Choose a tag to compare

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

30 Apr 19:38
2ab53dd

Choose a tag to compare

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 vectorSearch search indexes, by adding a type: parameter to the #create_one method. (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

19 Sep 17:38
6c26542

Choose a tag to compare

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_ms option. Deprecated options include socket_timeout, wait_queue_timeout, wtimeout, max_time_ms, and max_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_factor parameter.
  • 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

New Contributors

Full Changelog: v2.20.1...v2.21.0

2.20.1

10 Jul 15:44
8f16460

Choose a tag to compare

Version 2.20.1 of the MongoDB Ruby Driver is now available.

Release Highlights

This patch release includes one bug fix, and one documentation update:

  • RUBY-3496 Certain retryable errors were not being retried when legacy retries were enabled. Thank you to Joe Lim for the PR!
  • RUBY-3434 Documentation was added/improved to suggest how to configure Mongoid for use with forking web servers. Thank you to Johnny Shields for the PR!

Documentation

Documentation is available at MongoDB.com.

Installation

You may install this version via RubyGems, with:

gem install --version 2.20.1 mongo

What's Changed

Full Changelog: v2.20.0...v2.20.1

2.20.0

28 Mar 20:56
74e4e38

Choose a tag to compare

Version 2.20.0 of the Ruby driver for MongoDB is released. This adds the following new features:

  • Connection strings no longer require a slash between the hosts and the options. E.g., "mongodb://example.com?w=1" and "mongodb://example.com/?w=1" are both valid connection strings now. (https://jira.mongodb.org/browse/RUBY-3329)
  • Container runtime and orchestration metadata for the client environment are now sent to the server for analytics purposes. (https://jira.mongodb.org/browse/RUBY-3298)
  • When connecting to a CosmosDB (Azure) or DocumentDB (Amazon) instance, a warning message will now be logged. (https://jira.mongodb.org/browse/RUBY-3296)
  • When attempting a retry of a read or write operation in a sharded topology, the retry will be attempted on a different mongos instance, if possible. (https://jira.mongodb.org/browse/RUBY-2748)
  • Add support for the newly-released Ruby-BSON version 5.0.
  • Support for Ruby 2.5 and 2.6 has been discontinued. Support for Ruby 2.7 and JRuby 9.2 has been deprecated, and will be discontinued in a future driver version. Support for JRuby 9.4 has been added.

This release also fixes the following user-facing issues: