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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker - P1 Blocker - P1
    • 2.4
    • 2.3
    • Cluster Management
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: