Commit 6c9c981
committed
readyset-mysql: properly close mysql connections
When we have a MySQL connection open to upstream, before we close the
connection, we need to send a COM_QUIT indicating we are about to
terminate the connection.
The write_command is an async function and by itself cannot be
called as part of a destructor. We adjust the code to have a dedicated
tokio task that will be responsible for sending the COM_QUIT command.
Fixes: REA-5525
Closes: #1476
Release-Note-Core: Send a COM_QUIT command when closing a MySQL
connection in order to avoid log flooding with aborted connection.
Change-Id: Ibcb6dffdb55b4ba955b20b704c2f33162f8251c0
Reviewed-on: https://gerrit.readyset.name/c/readyset/+/9085
Reviewed-by: Sidney Cammeresi <sac@readyset.io>
Tested-by: Buildkite CI1 parent fc819f9 commit 6c9c981
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
476 | 481 | | |
477 | 482 | | |
0 commit comments