Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions source/client-backpressure/client-backpressure.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ rules:
2. A retry attempt will only be permitted if:
1. The error is a retryable overload error.
2. We have not reached `MAX_RETRIES`.
- The value of `MAX_RETRIES` is 5 and non-configurable.
- The default value of `MAX_RETRIES` is 2. Drivers MUST expose this as a configurable option `maxRetries`.
- This intentionally changes the behavior of CSOT which otherwise would retry an unlimited number of times within
Comment on lines 124 to 126
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description mentions a new maxAdaptiveRetries driver option, but this spec text requires drivers to expose MAX_RETRIES as maxRetries. Please align the option name between the PR description and the spec (and ensure the chosen name is used consistently throughout the spec).

Copilot uses AI. Check for mistakes.
the timeout to avoid retry storms.
3. (CSOT-only): There is still time for a retry attempt according to the
Expand All @@ -142,9 +142,10 @@ rules:
- `MAX_BACKOFF` is 10000ms.
- This results in delays of 100ms, 200ms, 400ms, 800ms, and 1600ms before accounting for jitter.
4. If the request is eligible for retry (as outlined in step 2 above and step 4 in the
[adaptive retry requirements](client-backpressure.md#adaptive-retry-requirements) below), the client MUST add the
previously used server's address to the list of deprioritized server addresses for
[server selection](../server-selection/server-selection.md).
[adaptive retry requirements](client-backpressure.md#adaptive-retry-requirements) below) and
`enableOverloadRetargeting` is enabled, the client MUST add the previously used server's address to the list of
deprioritized server addresses for [server selection](../server-selection/server-selection.md). Drivers MUST expose
this as a configurable boolean option named `enableOverloadRetargeting` defaulting to `false`.
Comment on lines +147 to +148
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule 4 now gates adding the previously-used server to the deprioritized list behind enableOverloadRetargeting, but the pseudocode later in this document still unconditionally appends the server address to deprioritized_servers. Please update the pseudocode/algorithm description to match the new conditional behavior so the spec is internally consistent.

Suggested change
deprioritized server addresses for [server selection](../server-selection/server-selection.md). Drivers MUST expose
this as a configurable boolean option named `enableOverloadRetargeting` defaulting to `false`.
deprioritized server addresses for [server selection](../server-selection/server-selection.md). If
`enableOverloadRetargeting` is disabled, the client MUST NOT add the previously used server's address to this list.
Drivers MUST expose this as a configurable boolean option named `enableOverloadRetargeting` defaulting to `false`.

Copilot uses AI. Check for mistakes.
5. If the request is eligible for retry (as outlined in step 2 above and step 4 in the
[adaptive retry requirements](client-backpressure.md#adaptive-retry-requirements) below) and is a retryable write:
1. If the command is a part of a transaction, the instructions for command modification on retry for commands in
Expand Down Expand Up @@ -199,7 +200,7 @@ BASE_BACKOFF = 0.1 # 100ms
MAX_BACKOFF = 10 # 10000ms

RETRY_TOKEN_RETURN_RATE = 0.1
MAX_RETRIES = 5
MAX_RETRIES = 2

def execute_command_retryable(command, ...):
deprioritized_servers = []
Expand Down
Loading