Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-121

MongoDB driver does not return error with auto_reconnect: true.

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 1.4
    • Affects Version/s: 3.0.0
    • Component/s: None
    • Environment:
      Linux

      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?

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            dvazquez1027 David Vazquez
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: