Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-892

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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.9
    • Affects Version/s: 1.8.3
    • Component/s: None
    • Labels:
      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@mongodb.com Robert Stam
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: