Rerouting commands to the Primary does not always work when ConnectionMode is Automatic

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.9
    • Affects Version/s: 1.8.3
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When running commands the ReadPreference is overridden and the command is sent to the Primary if the command is not white listed as being allowed to be run on a Secondary. This overriding should only be done when connected to a ReplicaSet.

      However, when using Automatic ConnectionMode a DiscoveringMongoServerProxy is used, and the actual type of the cluster is not known until after Connect has been called.

      The code that reroutes commands to the primary should ensure that the proxy type is not Unknown before deciding whether to reroute the command or not.

              Assignee:
              Robert Stam
              Reporter:
              Robert Stam
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: