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

Node.JS mysql async.parallel redundant (or needs to be changed) #33

Closed
sidorares opened this issue Mar 30, 2013 · 3 comments
Closed

Node.JS mysql async.parallel redundant (or needs to be changed) #33

sidorares opened this issue Mar 30, 2013 · 3 comments

Comments

@sidorares
Copy link
Contributor

As mysql protocol does not allow for parallel queries on one connection to have real parallel queries on need to acquire multiple db connections from pool. If test tries to emulate 'N queries, and each depends on previous result' than async.parallel here is unnecessary, if it's actually 'execute N independent queries' then it might be better to get a connection from pool for each sub-query

@bhauer
Copy link
Contributor

bhauer commented Apr 9, 2013

Hi @sidorares. Thank you for the tip.

The test is not attempting to emulate an "N queries, and each depend son the previous result" scenario. It it "N" independent queries." With that in mind, based on your feedback, it sounds like each of the independent queries should request a connection of its own. That makes sense to me.

The code has been modified since you submitted your issue, but I believe the raw MySQL implementation retains the behavior of using a single connection for all of the async queries. I'll raise this to the attention of those who have contributed corrections and tweaks in the node.js test code to see what they think.

@bhauer
Copy link
Contributor

bhauer commented May 29, 2013

@pfalls1 Since #125 has been merged, should this issue be closed?

@pfalls1
Copy link
Contributor

pfalls1 commented May 29, 2013

@bhauer, yes I believe so.

@pfalls1 pfalls1 closed this as completed May 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants