|
I agree this seems to be a dup of DRIVERS-1571. DRIVERS-746 is also related.
Per the SDAM spec here we mark the server as unknown during the auth failure, but it's not clear if that includes a mongos auth failure
Yes an auth failure from mongos is the same as an auth failure from mongod so the driver will mark the mongos unknown. Assuming that the mongos is still reporting itself as healthy, SDAM will rediscover the node automatically sometime soon after (anywhere from 0 seconds to 10 seconds later). Note that this was recently changed in DRIVERS-1476. Before DRIVERS-1476, the driver would not mark the server unknown from an auth error.
So after DRIVERS-1476 is implemented, drivers will select the unhealthy mongos less frequently. The state will flip-flop between healthy and unknown. This isn't perfect but it's better than the old behavior where the server would stay in the healthy state forever.
|