Bug #54135 | setQueryTimeout unsafe across VIP | ||
---|---|---|---|
Submitted: | 1 Jun 2010 11:16 | Modified: | 15 Apr 2011 15:29 |
Reporter: | Martin Waite | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 5.1.x | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[1 Jun 2010 11:16]
Martin Waite
[2 Jun 2010 6:20]
Tonci Grgin
Hi Martin and thanks for your report. I do see the problem but there is just no way to pick the right server with VIP. Will consult with others but not sure what will come out of it.
[9 Jun 2010 8:16]
Tonci Grgin
I need Mark's insight here... IMO, it's not just VIP, this can happen in round-robin and such too. Maybe the right way to go, at least for MySQL server's supporting it, would be to embed an UID in a comment in query and look for it in process list before killing anything.
[10 Jun 2010 7:19]
Tonci Grgin
Martin, we discussed this and there is just no way to fix this elegantly for now. Sorry.
[19 Jan 2011 9:51]
Tonci Grgin
Since there is no way for connector to tell where the connection went in this scenario, the workaround would be to use queryTimeoutKillsConnection option to simply kill the offending connection or to use external query killer. Since injecting some sort of identifier would cause connector, upon timeout, to log to *all* hosts in search of proper UUID will be costly I'm exploring other possibilities. One of them is to file a feature request to server to support timeouts in COM_QUERY. For now, I think I'll start over with implementing a mechanism that will prevent c/J from killing the right threadID on *wrong* server. Then we'll see.
[15 Apr 2011 15:29]
Tonci Grgin
Partial fix pushed to revision 1058. Fix prevents c/J from killing the right ConnectionID on wrong server.