You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/client-backpressure/client-backpressure.md
+51-36Lines changed: 51 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,16 +110,10 @@ overload error, including those not eligible for retry under the
110
110
updateMany, create collection, getMore, and generic runCommand. The new command execution method obeys the following
111
111
rules:
112
112
113
-
1.`attempt` is the execution attempt number (starting with 0). Note that `attempt` includes retries for errors that
114
-
are not overload errors (this might include attempts under other retry policies, see
113
+
1.`attempt` is the execution attempt number (starting with 0). Note that `attempt` includes retries for errors that are
114
+
not overload errors (this might include attempts under other retry policies, see
115
115
[Interactions with Other Retry Policies](./client-backpressure.md#interaction-with-other-retry-policies)).
116
-
2. If the command succeeds on the first attempt, drivers MUST deposit `RETRY_TOKEN_RETURN_RATE` tokens.
117
-
- The value is 0.1 and non-configurable.
118
-
3. If the command succeeds on a retry attempt, drivers MUST deposit `RETRY_TOKEN_RETURN_RATE`+1 tokens.
119
-
4. If a retry attempt fails with an error that is not an overload error, drivers MUST deposit 1 token.
120
-
- An error that does not contain the `SystemOverloadedError` error label indicates that the server is healthy enough
121
-
to handle requests. For the purposes of retry budget tracking, this counts as a success.
122
-
5. A retry attempt will only be permitted if:
116
+
2. A retry attempt will only be permitted if:
123
117
1. The error is a retryable overload error.
124
118
2. We have not reached `MAX_RETRIES`.
125
119
- The value of `MAX_RETRIES` is 5 and non-configurable.
@@ -128,43 +122,58 @@ rules:
128
122
3. (CSOT-only): There is still time for a retry attempt according to the
129
123
[Client Side Operations Timeout](../client-side-operations-timeout/client-side-operations-timeout.md)
130
124
specification.
131
-
4. A token can be consumed from the token bucket.
132
-
5. The command is a write and [retryWrites](../retryable-writes/retryable-writes.md#retrywrites) is enabled or the
125
+
4. The command is a write and [retryWrites](../retryable-writes/retryable-writes.md#retrywrites) is enabled or the
133
126
command is a read and [retryReads](../retryable-reads/retryable-reads.md#retryreads) is enabled.
134
127
- To retry `runCommand`, both [retryWrites](../retryable-writes/retryable-writes.md#retrywrites) and
135
-
[retryReads](../retryable-reads/retryable-reads.md#retryreads)must be enabled. See
128
+
[retryReads](../retryable-reads/retryable-reads.md#retryreads)MUST be enabled. See
136
129
[Why must both `retryWrites` and `retryReads` be enabled to retry runCommand?](client-backpressure.md#why-must-both-retrywrites-and-retryreads-be-enabled-to-retry-runcommand)
137
-
6. A retry attempt consumes 1 token from the token bucket.
138
-
7. If the request is eligible for retry (as outlined in step 5), the client MUST apply exponential backoff according to
139
-
the following formula: `backoff = jitter * min(MAX_BACKOFF, BASE_BACKOFF * 2^(attempt - 1))`
130
+
3. If the request is eligible for retry (as outlined in step 2 above and step 4 in the
131
+
[adaptive retry requirements](client-backpressure.md#adaptive-retry-requirements) below), the client MUST apply
132
+
exponential backoff according to the following formula:
0 commit comments