-
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 #1852
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
Draft
blink1073
wants to merge
24
commits into
mongodb:master
Choose a base branch
from
blink1073:DRIVERS-3218
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
DRIVERS-3218 Avoid clearing the connection pool when the server connection rate limiter triggers #1852
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
4e6bfeb
DRIVERS-318 Avoid clearing the connection pool when the server connec…
blink1073 d830b12
update changelogs
blink1073 c6c8626
address todo
blink1073 70de630
update unified format and cmap-format
blink1073 51196d8
Merge branch 'master' of github.com:mongodb/specifications into DRIVE…
blink1073 3d27dd4
update schemas
blink1073 b72e044
address review
blink1073 20cc961
clarify backoff logic
blink1073 dc6797b
add tests
blink1073 e72968a
fix test
blink1073 91cd80f
formatting
blink1073 b0561bd
update schema version
blink1073 5b37566
formatting
blink1073 a56e7ec
update tests
blink1073 4c0df36
update tests
blink1073 39acfd2
address review
blink1073 fdb46c6
add unified schema tests
blink1073 8b0d35d
update tests
blink1073 a8ffc2a
bump schema version
blink1073 db4b1a3
bump schema version
blink1073 c7608cc
undo yaml changes
blink1073 ab2eb87
undo connection-logging changes
blink1073 7309f40
add connection-logging-pool-backoff tests
blink1073 b349f0b
update json
blink1073 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
...ce/connection-monitoring-and-pooling/tests/cmap-format/pool-backoff-connection-close.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
source/connection-monitoring-and-pooling/tests/cmap-format/pool-backoff-connection-close.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| version: 1 | ||
| style: integration | ||
| description: pool enters backoff on connection close | ||
| runOn: | ||
| - minServerVersion: 4.9.0 | ||
| failPoint: | ||
| configureFailPoint: failCommand | ||
| mode: | ||
| times: 1 | ||
| data: | ||
| failCommands: | ||
| - isMaster | ||
| - hello | ||
| closeConnection: true | ||
| poolOptions: | ||
| minPoolSize: 0 | ||
| operations: | ||
| - name: ready | ||
| - name: start | ||
| target: thread1 | ||
| - name: checkOut | ||
| thread: thread1 | ||
| - name: waitForEvent | ||
| event: ConnectionCreated | ||
| count: 1 | ||
| - name: waitForEvent | ||
| event: ConnectionCheckOutFailed | ||
| count: 1 | ||
| events: | ||
| - type: ConnectionCheckOutStarted | ||
| - type: ConnectionCreated | ||
| - type: ConnectionClosed | ||
| - type: ConnectionPoolBackoff | ||
| - type: ConnectionCheckOutFailed | ||
| ignore: | ||
| - ConnectionCheckedIn | ||
| - ConnectionCheckedOut | ||
| - ConnectionPoolCreated | ||
| - ConnectionPoolReady |
76 changes: 76 additions & 0 deletions
76
...nitoring-and-pooling/tests/cmap-format/pool-backoff-interrupting-pending-connections.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
...onitoring-and-pooling/tests/cmap-format/pool-backoff-interrupting-pending-connections.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| version: 1 | ||
| style: integration | ||
| description: backoff closes pending connections | ||
| runOn: | ||
| - minServerVersion: 4.9.0 | ||
| poolBackoff: true | ||
| failPoint: | ||
| configureFailPoint: failCommand | ||
| mode: alwaysOn | ||
| data: | ||
| failCommands: | ||
| - isMaster | ||
| - hello | ||
| closeConnection: false | ||
| blockConnection: true | ||
| blockTimeMS: 10000 | ||
| poolOptions: | ||
| minPoolSize: 0 | ||
| operations: | ||
| - name: ready | ||
| - name: start | ||
| target: thread1 | ||
| - name: checkOut | ||
| thread: thread1 | ||
| - name: waitForEvent | ||
| event: ConnectionCreated | ||
| count: 1 | ||
| - name: backoff | ||
| - name: waitForEvent | ||
| event: ConnectionCheckOutFailed | ||
| count: 1 | ||
| events: | ||
| - type: ConnectionCheckOutStarted | ||
| - type: ConnectionCreated | ||
| - type: ConnectionPoolBackoff | ||
| - type: ConnectionClosed | ||
| - type: ConnectionCheckOutFailed | ||
| ignore: | ||
| - ConnectionCheckedIn | ||
| - ConnectionCheckedOut | ||
| - ConnectionPoolCreated | ||
| - ConnectionPoolReady |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was talking with @ShaneHarvey about this (related comments on drivers ticket). Shane's understanding is that we decided to include all timeout errors, regardless of where it originated, during connection establishment. Does that match your understanding, Steve?
And related; the design says:
We should update the design with whatever the outcome of this thread is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's a good callout, but it can't be from auth, since the auth spec explicitly calls out the timeout behavior. I'm assuming all drivers can distinguish between hello and auth since the are separate commands. I'll update to say if the driver can distinguish between TCP connect/DNS and the TLS handshake then it MUST do so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which timeout behavior in the auth spec are you referring to? I searched for
timeoutand only saw stuff about what timeout values to use, but not how to handle network timeouts. Maybe I'm looking in the wrong place though.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, the specs must have gotten out of sync. I'm referring to:
https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md#why-mark-a-server-unknown-after-an-auth-error
"The Authentication spec requires that when authentication fails on a server, the driver MUST clear the server's connection pool"