Allow mixing of localhost and non-localhost replica set members in config

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Replication
    • Repl 2026-05-11, Repl 2026-05-25, Repl 2026-06-08
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This logic current prevents this. If this isn't a capability we want to enable in general (e.g. to prevent human error) then let's add a server parameter to optionally override it.

      if (localhostCount != 0 && localhostCount != getMembers().size()) {
          return Status(
              ErrorCodes::BadValue,
              str::stream()
                  << "Either all host names in a replica set configuration must be localhost "
                      "references, or none must be; found "
                  << localhostCount << " out of " << getMembers().size());
      }
      

            Assignee:
            Vishnu Kaushik
            Reporter:
            Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: