[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:
Related
is related to GODRIVER-322 Handshake changes for SDAM and Auth Closed

 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

GODRIVER-442

Change-Id: I9f304471a89d4a770e43db7488311933b0b38960
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/95b9288acd4589b05a749a275f68c7e219a409c3

Comment by Divjot Arora (Inactive) [ 04/Jun/18 ]

Code review: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/413279

Generated at Thu Feb 08 08:34:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.