vitessio / vitess

Vitess is a database clustering system for horizontal scaling of MySQL.
http://vitess.io
Apache License 2.0
18.42k stars 2.08k forks source link

Tabletserver connpool query killing will not work correctly against multi-instance MySQL backends, may kill unrelated queries #9055

Open aquarapid opened 2 years ago

aquarapid commented 2 years ago

I realized this while reading through the code:

This all works well as long as all connections are going to the same MySQL backend. However, this might not always be the case:

Fixing this isn't trivial. Some possible options:

aquarapid commented 2 years ago

To solve this generally is high effort (we'd have to track each backend instance individually); as a workaround, the following has been suggested:

This is not ideal, but should limit the potential negative consequences of this issue.