getStats() helper should respect DBCollection read preference

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 3.0.4, 3.1.0
    • Affects Version/s: 3.0.3
    • Component/s: Command Operations
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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:
              Jeffrey Yemin
              Reporter:
              Luke Lovett (Inactive)
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: