From 81ffb38cd0f5bc1ae7270b96c974f51e2b8f6cd5 Mon Sep 17 00:00:00 2001 From: Isabel Atkinson Date: Tue, 30 Jun 2026 16:25:50 -0400 Subject: [PATCH] update docs --- driver/src/client.rs | 8 ++++---- driver/src/client/options.rs | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/driver/src/client.rs b/driver/src/client.rs index d7a2ea01c..aca860831 100644 --- a/driver/src/client.rs +++ b/driver/src/client.rs @@ -120,10 +120,10 @@ const DEFAULT_SERVER_SELECTION_TIMEOUT: Duration = Duration::from_secs(30); /// details. /// /// ## Overload Retry Behavior -/// All operations executed by a `Client` may retry if the selected server is overloaded. For -/// details on server load-shedding, see the documentation for -/// [Intelligent Workload Management](https://www.mongodb.com/docs/atlas/intelligent-workload-management/) -/// and [Overload Errors](https://www.mongodb.com/docs/atlas/overload-errors). +/// All operations executed by a `Client` may retry if the selected server is overloaded. An +/// overload error is indicated by the +/// [`SYSTEM_OVERLOADED_ERROR`](crate::error::SYSTEM_OVERLOADED_ERROR) error label. This behavior is +/// functional with MongoDB server version 9.0 and above. /// /// The following options can be configured to customize this behavior: /// - Set [`ClientOptions::retry_reads`] to false to disable retrying all reads. Note that this will diff --git a/driver/src/client/options.rs b/driver/src/client/options.rs index 126192b28..ebf643832 100644 --- a/driver/src/client/options.rs +++ b/driver/src/client/options.rs @@ -689,11 +689,15 @@ pub struct ClientOptions { /// The maximum number of retries to perform when overload errors are encountered. Defaults to /// 2. + /// + /// This option only has an effect with MongoDB server version 9.0 and above. pub max_adaptive_retries: Option, /// Whether to enable overload retargeting when overload errors are encountered. When overload /// retargeting is enabled, the server on which an overload error occurs is deprioritized /// when selecting a server for a retry attempt. Defaults to false. + /// + /// This option only has an effect with MongoDB server version 9.0 and above. pub enable_overload_retargeting: Option, /// Information from the SRV URI that generated these client options, if applicable. @@ -1088,11 +1092,15 @@ pub struct ConnectionString { /// The maximum number of retries to perform when overload errors are encountered. Defaults to /// 2. + /// + /// This option only has an effect with MongoDB server version 9.0 and above. pub max_adaptive_retries: Option, /// Whether to enable overload retargeting when overload errors are encountered. When overload /// retargeting is enabled, the server on which an overload error occurs is deprioritized /// when selecting a server for a retry attempt. Defaults to false. + /// + /// This option only has an effect with MongoDB server version 9.0 and above. pub enable_overload_retargeting: Option, #[serde(serialize_with = "serde_util::serialize_duration_option_as_int_millis")]