Add spec test for server deprioritization with changed ServerDescription

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Component/s: Server Selection
    • None
    • Needed - No Spec Changes
    • Hide

      Summary of necessary driver changes

      •  unified spec test for object state change

      Commits for syncing spec/prose tests
      (and/or refer to an existing language POC if needed)

      Context for other referenced/linked tickets

      •  This is related to the client backpressure ticket DRIVERS-3344 (Add support for server selection's deprioritized servers to all topologies)
      Show
      Summary of necessary driver changes  unified spec test for object state change Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed)   https://github.com/mongodb/specifications/commit/9e2acc6c9f77977cdbc0705cd8e236ed4d1b6551 Context for other referenced/linked tickets  This is related to the client backpressure ticket DRIVERS-3344 (Add support for server selection's deprioritized servers to all topologies)
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-6215 Needs Triage
      CXX-3406 Needs Triage
      CSHARP-5855 Needs Triage
      GODRIVER-3795 Needs Triage
      JAVA-6074 Needs Triage
      NODE-7415 In Progress
      PYTHON-5706 Needs Triage
      PHPLIB-1776 Needs Triage
      RUBY-3762 Needs Triage
      RUST-2349 Needs Triage
      $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 */ } #scriptField td.willNotDo { background-color: #FF0000; /* Red color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-6215 Needs Triage CXX-3406 Needs Triage CSHARP-5855 Needs Triage GODRIVER-3795 Needs Triage JAVA-6074 Needs Triage NODE-7415 In Progress PYTHON-5706 Needs Triage PHPLIB-1776 Needs Triage RUBY-3762 Needs Triage RUST-2349 Needs Triage

      Summary

      The server selection spec states that deprioritization should use "only server addresses and not ServerDescription objects" to ensure a deprioritized server cannot become eligible for retry due to topology changes. However, the existing spec tests all use identical ServerDescriptions between topology_description.servers and deprioritized_servers, so drivers using full ServerDescription equality instead of address-only comparison will incorrectly pass all tests.

      Motivation

      Avoid introducing buggy code that attempts to filter candidates based on a server object, e.g. {27017, RSPrimary, 50ms} != {27017, RSSecondary, 5ms} would incorrectly pass the filter, allowing the same server (with changed state) to be selected for retry.

      Acceptance Criteria

      Add a unified spec test to cover the following case:

      1. Client sends operation to b:27017 (RSPrimary, RTT 50ms)
      2. Operation fails
      3. Driver adds b:27017 to deprioritized list with its current state
      4. Topology monitor updates and b:27017 stepped down (RSSecondary, RTT 5ms)
      5. Ensure that b:2717 does not pass the filter and does not get selected for retry

            Assignee:
            Preston Vasquez
            Reporter:
            Preston Vasquez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: