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

Calling setReadPreference(ReadPreference.SECONDARY) is not reading from secondary servers

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.7.2
    • None
    • Cluster Management
    • None

    Description

      In a test environment with 4 MongoDB instances, all the reads in the attached test code are executed against only the master server. This is identified by the watching the console of each of the instances, and the CPU of the machines on which the instances are running.

      The call the DBCursor.getServerAddress() is not working either, it only returns a null, so that we cannot verify where the reads are being executed. (Not sure if this is related.)

      Attachments

        1. mongo.jar
          285 kB
        2. testMongoSecondayReads.java
          2 kB

        Activity

          People

            antoine Antoine Girbal
            jason nethercott Jason Nethercott
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: