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

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.0
    • Affects Version/s: None
    • Component/s: Connectivity
    • Labels:
      None
    • Minor Change

      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.

            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: