Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-795

Clarify behavior when "me" field doesn't match any values in "hosts" array

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: None
    • Labels:
      None
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      PYTHON-2106 Works as Designed
      NODE-2432 Fixed 3.6.0, 4.0.0
      MOTOR-494 Works as Designed
      CSHARP-2912 Fixed 2.11.0
      CDRIVER-3501 Backlog
      PHPC-1537 Blocked
      GODRIVER-1472 Fixed 1.5.0
      RUBY-2099 Fixed 2.12.0.rc0
      CXX-1914 Backlog
      JAVA-3602 Fixed 4.1.0
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion PYTHON-2106 Works as Designed NODE-2432 Fixed 3.6.0, 4.0.0 MOTOR-494 Works as Designed CSHARP-2912 Fixed 2.11.0 CDRIVER-3501 Backlog PHPC-1537 Blocked GODRIVER-1472 Fixed 1.5.0 RUBY-2099 Fixed 2.12.0.rc0 CXX-1914 Backlog JAVA-3602 Fixed 4.1.0

      In scope of SPEC-192, the SDAM spec was modified to say that a server that responds with a "me" field value that is different than the host/port that was used to connect to that server, the server should be removed from the topology (after adding all the values from the "hosts" field array value.

      The current belief is that this is still correct, but in scope of HELP-12962 we realized that our drivers are not consistent in their implementation, and it's affecting whether the "split horizons" feature in MongoDB 4.2 works with all of our drivers.

      In reviewing the spec tests from SPEC-192, it's clear that there is room for improvement to ensure consistency between drivers. Currently, all the server responses that we unit test are documents where the value of the "me" field matches one of the values in the "hosts" field array. We should add a test where they don't match, and assert what the expected outcome is.

      Something like this, perhaps:

      description: Secondary mismatched me (2)
      phases:
        - outcome:
            servers:
              'public2:27017':
                setName: null
                type: Unknown
            setName: rs
            topologyType: ReplicaSetNoPrimary
            logicalSessionTimeoutMinutes: null
          responses:
            - - 'public1:27017'
              - me: 'private1:27017'
                hosts:
                  - 'public1:27017'
                  - 'public2:27017'
                ismaster: false
                ok: 1
                setName: rs
                minWireVersion: 0
                maxWireVersion: 6
      uri: 'mongodb://public1:27017,public2:27017/?replicaSet=rs'
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: