-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Component/s: Handshake
-
None
-
Not Needed
Summary
The Handshake unified spec test "metadata append does not create new connections or close existing ones and no hello command is sent" in metadata-not-propagated.yml will frequently fail on sharded clusters.
That test runs multiple "ping" operations while appending the client metadata, and asserts that only a single connection is created. However, if the driver is connected to a sharded cluster with 2+ mongoS nodes, the driver might select a different mongoS node for each "ping" operation, resulting in extra connection created events, violating the test assertion.
Motivation
Who is the affected end user?
Drivers devs.
How does this affect the end user?
Drivers devs might be confused by a failing test.
How likely is it that this problem or use case will occur?
In the Go Driver, it happens very reliably when connected to a sharded cluster with 2+ mongoS nodes. The standard sharded cluster created by mongo-orchestration has at least 2 mongoS nodes and it fails very reliably in the Go Driver CI.
If the problem does occur, what are the consequences and how severe are they?
Annoying test failure that needs to be manually ignored or skipped. Drivers devs might spend time troubleshooting the test failure and then determine that it's not a problem with their implementation.
Is this issue urgent?
Does this ticket have a required timeline? What is it?
Is this ticket required by a downstream team?
No.
Is this ticket only for tests?
Yes
Acceptance Criteria
Update the "metadata append does not create new connections or close existing ones and no hello command is sent" test so the assertions work correctly on sharded clusters. Alternatively, forbid running that test on sharded clusters.