[GODRIVER-442] Authentication error should drain a topology.Server's connection pool Created: 31/May/18 Updated: 28/Oct/23 Resolved: 05/Jun/18 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Server Discovery and Monitoring |
| Affects Version/s: | 0.0.6 |
| Fix Version/s: | 0.0.7 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kristofer Brandow (Inactive) | Assignee: | Divjot Arora (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Updates to the auth specification require that an authentication failure on a single general use socket must close all sockets in the pool. The mechanism to do this in the Go driver is to use the topology.Server.Drain method. Update the topology.Server.Connection method to check if the error returned from getting a connection from the pool is an authentication error. If it is, call the Drain method and return the error. This will ensure that the server's connections are all (eventually) closed. |
| Comments |
| Comment by Githook User [ 05/Jun/18 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com'}Message: Drain the connection pool if an auth error occurs Change-Id: I9f304471a89d4a770e43db7488311933b0b38960 |
| Comment by Divjot Arora (Inactive) [ 04/Jun/18 ] |
|
Code review: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/413279 |