[GODRIVER-1439] Only close heartbeat connections after they're opened Created: 13/Dec/19 Updated: 28/Oct/23 Resolved: 17/Dec/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Connections |
| Affects Version/s: | 1.1.3 |
| Fix Version/s: | 1.2.1, 1.1.4 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Patrick Meredith | Assignee: | Divjot Arora (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||
| Description |
|
When mongod is started after a client using SSL, heartbeat connections never succeed. When SSL is not used, the heartbeats correctly pick up once mongod is ready to receive connections. https://github.com/pmeredit/sqlproxy/tree/BI-2413 Is a branch of sqlproxy with a repro of this issue. https://github.com/pmeredit/sqlproxy/blob/BI-2413/REPRO_README.txt Describes how to run the repro.
EDIT: The root cause of this issue is that custom dialers return connections that appear to be non-nil but have a nil value due to the nil interface issue (https://golang.org/doc/faq#nil_error). In the heartbeat code, the driver should only call nc.Close if the branch that executes a heartbeat is taken (https://github.com/mongodb/mongo-go-driver/blob/master/x/mongo/driver/topology/server.go#L543). |
| Comments |
| Comment by Githook User [ 17/Dec/19 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com', 'username': 'divjotarora'}Message: |
| Comment by Githook User [ 17/Dec/19 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com', 'username': 'divjotarora'}Message: |
| Comment by Githook User [ 17/Dec/19 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com', 'username': 'divjotarora'}Message: |
| Comment by Divjot Arora (Inactive) [ 16/Dec/19 ] |
|
PR for the documentation changes in the driver: https://github.com/mongodb/mongo-go-driver/pull/260 |
| Comment by Jeffrey Yemin [ 16/Dec/19 ] |
|