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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.7.2
    • Affects Version/s: None
    • Component/s: Cluster Management
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.)

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

              Assignee:
              Antoine Girbal (Inactive)
              Reporter:
              Jason Nethercott
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: