-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Component/s: Load Balancer
-
None
-
Needed
-
Summary
Address a test failure in non-lb-connection-establishment on latest 8.1 server builds. The test failure appears related to SERVER-85804.
Details
SERVER-85804 changes a mongod to close load balanced connections if mongod was not configured to be load balanced.
This causes a test failure in the spec test: non-lb-connection-establishment.
Drivers expect a non-LB server to accept {hello: 1, loadBalanced: true}, and to then raise a driver-side error. From spec:
When the server’s hello response does not contain a serviceId field, the driver MUST throw an exception with the message “Driver attempted to initialize in load balancing mode, but the server does not support this mode.”
On latest 8.1 builds, the server appears to close the connection. With a non-LB server:
$ mongosh --eval "db.version()" 8.1.0-alpha0-451-gde379ff $ mongosh "mongodb://localhost:27017/?loadBalanced=true" --eval "db.runCommand({'ping': 1})" MongoNetworkError: connection 5 to 127.0.0.1:27017 closed
Compared with an 8.0 server:
$ mongosh --eval "db.version()" 8.0.5-rc2 $ mongosh "mongodb://localhost:27017/?loadBalanced=true" --eval "db.runCommand({'ping': 1})" MongoCompatibilityError: Driver attempted to initialize in load balancing mode, but the server does not support this mode.
Motivation
Who is the affected end user?
DBX devs, and users mistakenly setting loadBalanced=true in the URI when connecting to a non-LB server.
How does this affect the end user?
The connection close might be less informative than the driver error. Though the mongod log indicates the cause:
Mongod does not support load-balanced connections
How likely is it that this problem or use case will occur?
Certain.
If the problem does occur, what are the consequences and how severe are they?
Possibly confusing error.
Is this issue urgent?
Fixing the test failures for drivers is urgent to unblock testing latest server builds.
Is this ticket required by a downstream team?
No?
Is this ticket only for tests?
Maybe. If the decision is "this is the expected behavior", then yes.
Acceptance Criteria
- Ensure the non-lb-connection-establishment test passes in drivers testing servers containing
SERVER-85804.
- is related to
-
SERVER-101078 Do not close connection sending loadBalanced:true in mongod
-
- Needs Scheduling
-
- related to
-
DRIVERS-3109 Revert skip to non-lb-connection-establishment
-
- Blocked
-
- split to
-
GODRIVER-3485 Investigate changes from SERVER-85804
-
- Needs Triage
-
-
PHPLIB-1629 Investigate changes from SERVER-85804
-
- Needs Triage
-
-
RUBY-3624 Investigate changes from SERVER-85804
-
- Needs Triage
-
-
CXX-3225 Investigate changes from SERVER-85804
-
- Backlog
-
-
NODE-6771 Fix latest-build tests
-
- In Code Review
-
-
CDRIVER-5900 Investigate changes from SERVER-85804
-
- Closed
-
-
CSHARP-5499 Investigate changes from SERVER-85804
-
- Closed
-
-
JAVA-5791 Investigate changes from SERVER-85804
-
- Closed
-
-
MOTOR-1433 Investigate changes from SERVER-85804
-
- Closed
-
-
PYTHON-5142 Investigate changes from SERVER-85804
-
- Closed
-
-
RUST-2160 Investigate changes from SERVER-85804
-
- Closed
-