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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.8.3
    • Fix Version/s: 1.9
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: