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

Read against dead replica slave doesn't fail over correctly when there is no master

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Blocker - P1 Blocker - P1
    • 2.4
    • Affects Version/s: 2.3
    • Component/s: Cluster Management
    • None

      We always want reads against Mongo to succeed if there is at least one standard or passive node of the replica set alive. However, in DBTCPConnector's call() handling, if an IOException occurs against the chosen DBPort, the logic in _error() that calls checkMaster() will cause an error if the master is also unavailable. This checkMaster() needs to be conditional based on slaveOk being set. That is, if slaveOk is true in the call() method the check should be checkMaster(true, false) so that the list of hosts is refreshed even if it results in no master being found.

            Assignee:
            antoine Antoine Girbal
            Reporter:
            danielr Daniel Rinehart
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: