Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-5377

Should Compass implicitly set directConnection=true for single-host endpoints?

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.31.0
    • Affects Version/s: None
    • Component/s: Connectivity
    • Labels:
      None
    • 2
    • Needed
    • Hide

      Recent versions of Compass have been setting directConnection=true in some cases (namely, when connecting to a single host without an SRV connection string, and without replSet or loadBalanced options).

      Compass no longer has this behavior, and will instead not add a directConnection parameter to the connection string without the user’s knowledge. This means that when the intention is to connect to a single node of a replica set, users will need to explicitly specify directConnection=true in the connection string.

      Show
      Recent versions of Compass have been setting directConnection=true in some cases (namely, when connecting to a single host without an SRV connection string, and without replSet or loadBalanced options). Compass no longer has this behavior, and will instead not add a directConnection parameter to the connection string without the user’s knowledge. This means that when the intention is to connect to a single node of a replica set, users will need to explicitly specify directConnection=true in the connection string.
    • Iteration Seoul

      We haven’t made a firm decision on this point yet, I think. We added the current behavior, which is to add directConnection=true in these cases, in COMPASS-5012 without actually having discussed it (as far as I know).

      Pro:

      • It allows connecting to specific secondaries
      • It matches what mongosh does (although mongosh does this to match the legacy shell and because it is used for replset administration, neither of which affect Compass)

      Con:

      • Users are not aware that this happens
      • Users may want to connect to the full replica set by default
      • It mismatches the driver’s behavior

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: