MongoDB driver does not return error with auto_reconnect: true.

XMLWordPrintableJSON

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

      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:
              Christian Amor Kvalheim
              Reporter:
              David Vazquez
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: