-
Notifications
You must be signed in to change notification settings - Fork 246
DRIVERS-3218 Avoid clearing the connection pool when the server connection rate limiter triggers #1855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
DRIVERS-3218 Avoid clearing the connection pool when the server connection rate limiter triggers #1855
Changes from 24 commits
5ad9007
5536501
199c4d7
aa08fe9
7d32469
4d318fa
2c87677
f46d39c
a14cacc
fdcacbd
53a7fdf
2a287dc
c8d1a33
f4106e8
bdde73f
99948d7
3779d26
94a082e
659133f
9dedf63
b70d360
00e54b0
6bd9f70
9b9c4af
da3885a
7464e61
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -284,6 +284,14 @@ Endpoint. The pool has the following properties: | |
| - **Rate-limited:** A Pool MUST limit the number of [Connections](#connection) being | ||
| [established](#establishing-a-connection-internal-implementation) concurrently via the **maxConnecting** | ||
| [pool option](#connection-pool-options). | ||
| - **Backpressure-enabled** - The pool MUST add the error labels `SystemOverloadedError` and `RetryableError` to network | ||
| errors or network timeouts it encounters during the connection establishment or the `hello` message. These labels | ||
| are used by the | ||
| [SDAM error handling](../server-discovery-and-monitoring/server-discovery-and-monitoring.md#error-handling-pseudocode) | ||
| to avoid clearing the pool. The pool MUST NOT add the backpressure error labels during an authentication step | ||
| after the `hello` message. For errors that the driver can distinguish as never occurring due to server overload, | ||
| such as DNS lookup failures, TLS related errors, or errors encountered establishing a connection to a socks5 proxy, | ||
| the driver MUST clear the connection pool and MUST mark the server Unknown for these error types. | ||
|
|
||
| ```typescript | ||
| interface ConnectionPool { | ||
|
|
@@ -461,6 +469,7 @@ try: | |
| return connection | ||
| except error: | ||
| close connection | ||
| add `SystemOverloadedError` label if appropriate (see "backpressure-enabled" in [Connection Pool](#connection-pool)) | ||
| throw error # Propagate error in manner idiomatic to language. | ||
| ``` | ||
|
|
||
|
|
@@ -1375,6 +1384,8 @@ to close and remove from its pool a [Connection](#connection) which has unread e | |
|
|
||
| ## Changelog | ||
|
|
||
| - 2025-XX-YY: Add handling of backpressure error labels. | ||
|
||
|
|
||
| - 2025-01-22: Clarify durationMS in logs may be Int32/Int64/Double. | ||
|
|
||
| - 2024-11-27: Relaxed the WaitQueue fairness requirement. | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.