-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Component/s: Server Selection
-
None
-
Needed - No Spec Changes
-
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:
- Client sends operation to b:27017 (RSPrimary, RTT 50ms)
- Operation fails
- Driver adds b:27017 to deprioritized list with its current state
- Topology monitor updates and b:27017 stepped down (RSSecondary, RTT 5ms)
- Ensure that b:2717 does not pass the filter and does not get selected for retry
- related to
-
DRIVERS-3344 Add support for server selection's deprioritized servers to all topologies
-
- Implementing
-
- split to
-
CDRIVER-6215 Add spec test for server deprioritization with changed ServerDescription
-
- Needs Triage
-
-
CSHARP-5855 Add spec test for server deprioritization with changed ServerDescription
-
- Needs Triage
-
-
CXX-3406 Add spec test for server deprioritization with changed ServerDescription
-
- Needs Triage
-
-
GODRIVER-3795 Add spec test for server deprioritization with changed ServerDescription
-
- Needs Triage
-
-
JAVA-6074 Add spec test for server deprioritization with changed ServerDescription
-
- Needs Triage
-
-
PHPLIB-1776 Add spec test for server deprioritization with changed ServerDescription
-
- Needs Triage
-
-
PYTHON-5706 Add spec test for server deprioritization with changed ServerDescription
-
- Needs Triage
-
-
RUBY-3762 Add spec test for server deprioritization with changed ServerDescription
-
- Needs Triage
-
-
RUST-2349 Add spec test for server deprioritization with changed ServerDescription
-
- Needs Triage
-
-
NODE-7415 Add spec test for server deprioritization with changed ServerDescription
-
- In Progress
-