-
Type:
Task
-
Resolution: Done
-
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
-
- Closed
-
- related to
-
DRIVERS-3109 Revert skip to non-lb-connection-establishment
-
- Closed
-
- split to
-
CDRIVER-5900 Skip non-lb-connection-establishment test on server >=8.1
-
- Closed
-
-
CSHARP-5499 Skip non-lb-connection-establishment test on server >=8.1
-
- Closed
-
-
CXX-3225 Skip non-lb-connection-establishment test on server >=8.1
-
- Closed
-
-
GODRIVER-3485 Skip non-lb-connection-establishment test on server >=8.1
-
- Closed
-
-
JAVA-5791 Skip non-lb-connection-establishment test on server >=8.1
-
- Closed
-
-
MOTOR-1433 Skip non-lb-connection-establishment test on server >=8.1
-
- Closed
-
-
NODE-6771 Fix latest-build tests
-
- Closed
-
-
PHPLIB-1629 Skip non-lb-connection-establishment test on server >=8.1
-
- Closed
-
-
PYTHON-5142 Skip non-lb-connection-establishment test on server >=8.1
-
- Closed
-
-
RUBY-3624 Skip non-lb-connection-establishment test on server >=8.1
-
- Closed
-
-
RUST-2160 Skip non-lb-connection-establishment test on server >=8.1
-
- Closed
-