mysql
mysql copied to clipboard
Use LIFO for returning/retrieving connections from the pool
The current way this works (cycling through all of the connections) means that you can't make use of mysql's wait_timeout
setting for closing inactive connections. Once a connection is created it will be persisted forever unless you have very low levels of activity.
Was there a reason to cycle round-robin through the connections when this was initially implemented?
Will do 👍
As for why it was initially implemented as rr it was before my time so I have no idea :)
The implementation and test itself look good, though :+1:
The test failures are a little funny, but it looks like I may have broken the PoolCluster
RR stuff.
Must have just been a randomly failing test. Should be good to go now 🙆
https://github.com/mysqljs/mysql/pull/1749 can probably be closed off if this pr gets merged.
Gentle bump on this 😃. Had a chance to take a look over it @dougwilson ?
Not since my initial look as I have been away. I will get back soon and take a look at the new changes
All good 👍 Thanks for the message.
Did you get a chance to take a look over it? @dougwilson Thanks!