-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add new mysql connection drain #16298
Conversation
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16298 +/- ##
==========================================
- Coverage 68.71% 68.71% -0.01%
==========================================
Files 1544 1547 +3
Lines 198011 198280 +269
==========================================
+ Hits 136064 136244 +180
- Misses 61947 62036 +89 ☔ View full report in Codecov by Sentry. |
if shutdown { | ||
listener.Shutdown() | ||
} else { | ||
listener.Close() | ||
} |
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.
listener.Shutdown()
calls listener. Close()
. Any reason for doing this?
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.
listener.Shutdown()
also set the .shutdown
field to true and then close. We only want to close the listener here to stop accepting new connection but let the idle/current connection active. Shutting down will fail any idle connection on the next query.
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.
There should be more tests.
- Trying to use connection beyond on_term timeout.
- Run a busy query on a connection that returns the result after on_term timeout.
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Done via 1f7dfd3 cc @harshit-gangal |
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Now that I merged this, I realized we could use some release notes for this. I will add them in a subsequent PR. |
Description
This PR implements the #15971 RFC by adding a new mysql connection drain, which comes as an alternative to the already existing activity drain timeout.
Related Issue(s)
Checklist