Skip to content
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

Bug Report: vtcombo leaks connections on drop + create database #16605

Closed
brendar opened this issue Aug 15, 2024 · 0 comments · Fixed by #16606
Closed

Bug Report: vtcombo leaks connections on drop + create database #16605

brendar opened this issue Aug 15, 2024 · 0 comments · Fixed by #16606

Comments

@brendar
Copy link
Contributor

brendar commented Aug 15, 2024

Overview of the Issue

After executing DROP DATABASE followed by CREATE DATABASE several times queries will start to fail with "Too many connections" errors.

This is because the connection pools for each of the internal tablets are not closed on DROP DATABASE so they reconnect once the database exists again after the next CREATE DATABASE.

PR to fix this: #16606

Reproduction Steps

  1. Start vtcombo via vttestserver
vttestserver --keyspaces foo --num_shards 1 --port 20040
  1. Connect
mysql --host 127.0.0.1 --port 20043
  1. Count connections
mysql> select db, user, count(*) from information_schema.PROCESSLIST group by db, user order by db, user;
+----------+-----------------+----------+
| db       | user            | count(*) |
+----------+-----------------+----------+
| NULL     | event_scheduler |        1 |
| vt_foo_0 | vt_allprivs     |        1 |
| vt_foo_0 | vt_dba          |        8 |
+----------+-----------------+----------+
  1. Drop and create the database
mysql> drop database foo;
mysql> create database foo;
  1. Count connections
mysql> select db, user, count(*) from information_schema.PROCESSLIST group by db, user order by db, user;
+----------+-----------------+----------+
| db       | user            | count(*) |
+----------+-----------------+----------+
| NULL     | event_scheduler |        1 |
| vt_foo_0 | vt_allprivs     |        2 |
| vt_foo_0 | vt_dba          |       13 |
+----------+-----------------+----------+

Binary Version

Impacts main and previous versions

Operating System and Environment details

n/a

Log Fragments

No response

@brendar brendar added Needs Triage This issue needs to be correctly labelled and triaged Type: Bug labels Aug 15, 2024
@mattlord mattlord added Component: VTCombo and removed Needs Triage This issue needs to be correctly labelled and triaged labels Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants