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

Either enforce the distinction between Direct and Standalone connection modes or remove Standalone from the enum

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: Connectivity
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change

      Description

      Our enum for connection mode currently has two similar values:

      1. Direct
      2. Standalone

      The idea was that a Standalone connection would only succeed when the server was in fact a standalone, whereas a Direct connection would succeed no matter what the actual type of the server was.

      This would prevent accidental connections to secondaries or other non-primary servers.

      This distinction is not currently fully implemented. We should either completely implement the distinction or remove Standalone from the connection mode enum.

      If we decide to keep Standalone, a related question is what the default should be when the connection string only has a single server. Should it be Direct or Standalone?

      The argument for Standalone is that this is almost always what the application wants. Directly connecting to a secondary (or arbiter or whatever) is, or should be, a very unusual case.

      The argument for Direct would be that it would be more backward compatible.

        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: