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

getStats() helper should respect DBCollection read preference

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.0.4, 3.1.0
    • Affects Version/s: 3.0.3
    • Component/s: Command Operations
    • None

      The getStats() helper on DBCollection always uses the "primary" read preference, regardless of what read preference is set on the underlying collection. According to the server selection spec, the collStats command may use a "secondary" read preference: https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#use-of-read-preferences-with-commands

      This bug only affects the 3.0 version of the Java driver.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            luke.lovett Luke Lovett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: