Closed LewisJEllis closed 8 years ago
Thanks for this, I'm not very familiar with domains, so I'm going to trust this makes sense. (I've done some reading of the docs and it looks about right)
I'm currently working on v3 of the pool, but I'll try and get this and some other fixes released this weekend.
Thanks for the merge & release!
This is a case of the userland queueing problem. We don't have automatic implicit binding here, so we need to do explicit binding, as described in the domain docs.
I'm aware that domains are deprecated, people should avoid using them, a replacement is coming, etc, but there are use cases where they are absolutely necessary and losing the domain context can lead to state mismatches. This fix will be helpful for any projects that use node-pool (or anything depending on node-pool) and any sort of domain context pattern (or any of several error reporting and APM tools which do).
For reference, the widely-used redis, cassandra, mysql, and postgres drivers handle this correctly, among others.