coopernurse / node-pool

Generic resource pooling for node.js
2.37k stars 259 forks source link

Why does reflector swallow errors without warning them? #237

Closed willmorgan closed 5 years ago

willmorgan commented 6 years ago

Hey there. I'm trying to get to the bottom of why many users of this library are seeing EREQUEST issues when connecting to SQL Server. One thing I noticed is that node-pool will noop out for all events, even errors.

Example here: https://github.com/coopernurse/node-pool/blob/bad141b84c8cecf4115f3fedcde6fcf2c8257175/lib/utils.js#L12

Why is this, and is it possible to provide a replacement adapter to avoid this functionality? IMHO, it shouldn't be generically swallowing errors here, as I have a feeling that this might be obfuscating some of the contributing issues.

Related (MSSQL) issues:

sandfox commented 5 years ago

The reflector is just there to allow us to do Promise.all on a collection of promises that will resolve regardless of if any of the underlying promises reject. We use it to account for operations. As far as I'm aware we still have failure handlers on all of the underlying promises.

willmorgan commented 5 years ago

Thanks!