-
Type: Task
-
Resolution: Done
-
Priority: Critical - P2
-
Affects Version/s: 3.0.0
-
Component/s: None
-
Environment:Linux
-
Empty show more show less
When auto_reconnect is true (default), the mongodb node.js driver does not return an error if a connection cannot be established to the database. The db request is held in a command queue until the db connection is restored. I have looked through the source, but I can't find anything that could be done to make the driver report an error and remove the pending command(s) from the queue. I can always turn auto_reconnect off and handle the reconnects myself, but I really think this should be handled by the driver's auto reconnect feature.
Am I missing something or would an update to the driver be required to make it fail fast and abandon the pending commands if auto_reconnect is true and we can't get a connection to the db?