The MongoDB Go Driver Team is pleased to release version 2.6.0 of the official MongoDB Go Driver.
Release Highlights
Important
Go Driver v2.6 will be the last minor version to support MongoDB 4.2. Go Driver v2.7 will require MongoDB 4.4 or newer.
This release adds 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.
Two new methods of ClientOptions are available:
SetMaxAdaptiveRetries- specifies the maximum number of times the driver should retry operations that fail with a server side overload error. If not invoked, the default is 2.MaxAdaptiveRetriescan also be set through the "maxAdaptiveRetries" URI option (e.g. "maxAdaptiveRetries=5").SetEnableOverloadRetargeting- specifies whether the driver should enable overload retargeting for operations that fail with a server side overload error. If not invoked, the default is false.EnableOverloadRetargetingcan also be set through the "enableOverloadRetargeting" URI option (e.g. "enableOverloadRetargeting=true").
What's Changed
✨ New Features
- GODRIVER-3734 Add TransactionRunning to Session API by @prestonvasquez in #2309
- GODRIVER-3719: Expand server deprioritization to all topologies by @RafaelCenzano in #2292
- GODRIVER-3647 Add backoff for transaction retry. by @qingyang-hu in #2327
- GODRIVER-3646 Implement backpressure error labels for connection establishment by @tadjik1 in #2330
- GODRIVER-3822 Server selection deprioritization only for overload errors on replica sets. by @qingyang-hu in #2341
- GODRIVER-3658 Implement backpressure retry logic. by @qingyang-hu in #2353
- GODRIVER-3810 Update WithTransaction to raise timeout error. by @qingyang-hu in #2344
- GODRIVER-3844 Add
maxAdaptiveRetriesandenableOverloadRetargetingoptions for backpressure. by @qingyang-hu in #2363 - GODRIVER-3778 Add code examples for non-backpressure drivers handling backpressure errors. by @qingyang-hu in #2338
Full Changelog: v2.5.1...v2.6.0
For a full list of tickets included in this release, please see the list of fixed issues.
Documentation for the Go Driver can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. For issues with, questions about, or feedback for the Go Driver, please look into our support channels, including StackOverflow. Bugs can be reported in the Go Driver project in the MongoDB JIRA where a list of current issues can be found. Your feedback on the Go Driver is greatly appreciated!