You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current (3.4.0) implementation of connection.destroy() tries to kill ongoing query by opening side connection and executing KILL <thread-id>. It relies on the assumption that this new connection will reach the same server instance if the connection is open by IP rather than DNS.
// relying on IP in place of DNS to ensure using same serverconstremoteAddress=this.socket.remoteAddress;constconnOption=remoteAddress ? Object.assign({},this.opts,{host: remoteAddress}) : this.opts;
However, if the IP points to a Load Balancer with NAT, this new connection may be opened to another DB instance and then wrong session will be killed.
This behaviour must be optional, please add a corresponding parameter to ConnectionConfig. (I could work on a PR, if wanted)
The text was updated successfully, but these errors were encountered:
I just realized that threadId is also used to index active connections in pool.js, and thus it's possible that connections open to different servers via load balancer could clash with each other, correct?
Current (3.4.0) implementation of
connection.destroy()
tries to kill ongoing query by opening side connection and executingKILL <thread-id>
. It relies on the assumption that this new connection will reach the same server instance if the connection is open by IP rather than DNS.Quote from connection.js:
However, if the IP points to a Load Balancer with NAT, this new connection may be opened to another DB instance and then wrong session will be killed.
This behaviour must be optional, please add a corresponding parameter to
ConnectionConfig
. (I could work on a PR, if wanted)The text was updated successfully, but these errors were encountered: