Skip to content

Commit bb9dddd

Browse files
authored
DRIVERS-3218 clarify label handling (#1892)
No behavior changes. - Add the `RetryableError` error label to example code to match the description and implementations. - Clarify non-backpressure errors should not add the backpressure label.
1 parent 4d11668 commit bb9dddd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

source/connection-monitoring-and-pooling/connection-monitoring-and-pooling.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,9 @@ Endpoint. The pool has the following properties:
291291
to avoid clearing the pool. The pool MUST NOT add the backpressure error labels during an authentication step
292292
after the `hello` message. For errors that the driver can distinguish as never occurring due to server overload,
293293
such as DNS lookup failures, non‑I/O TLS errors (e.g., certificate validation or hostname‑mismatch failures), or
294-
errors encountered while establishing a connection to a SOCKS5 proxy, the driver MUST clear the connection pool and
295-
MUST mark the server Unknown for these error types. In contrast, if an I/O error (for example, an EOF error) occurs
296-
during the TLS handshake, the driver MUST treat it as a potential overload condition and MUST add the backpressure
297-
error labels.
294+
errors encountered while establishing a connection to a SOCKS5 proxy, the driver MUST NOT add backpressure error
295+
labels for these error types. In contrast, if an I/O error (for example, an EOF error) occurs during the TLS
296+
handshake, the driver MUST treat it as a potential overload condition and MUST add the backpressure error labels.
298297

299298
```typescript
300299
interface ConnectionPool {
@@ -472,7 +471,7 @@ try:
472471
return connection
473472
except error:
474473
close connection
475-
add `SystemOverloadedError` label if appropriate (see "backpressure-enabled" in [Connection Pool](#connection-pool))
474+
add `SystemOverloadedError` and `RetryableError` labels if appropriate (see "backpressure-enabled" in [Connection Pool](#connection-pool))
476475
throw error # Propagate error in manner idiomatic to language.
477476
```
478477

0 commit comments

Comments
 (0)