Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-187

Mongo construction does not cause error (when server down)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.3
    • Affects Version/s: 2.2
    • Component/s: None
    • None

      If you do something as simple as Mongo() you will not get an error if the server isn't running until you run a command or query. (isMaster is no long called unless the pair/list constructor is used)

      This is a byproduct of the new replicaset discovery and the ability to connect directly to a non-master node therein. We should probably put the immediate error trigger back in when constructing a Mongo instance. To do this I suggest adding a constructor (or set) that takes a bool doNotAddAllNodes, or something like that.

      Right now the constructors are not very helpful in describing the expected behavior. Does the driver find the master or other slaves/nodes? If so which node is actually used?

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: