-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Server Selection
-
None
-
None
-
Go Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Context
From work in REP-6576, if a go-driver client receives a server selection timeout due to a change in the IP address of the connected mongos/mongod process, any further server interactions, including retries for the failed command, will continue to fail. The only fix is to reconnect to the server by re-discovering the new IP for the mongos/mongod process.
While the application layer can achieve the same by creating a fresh client upon receiving server selection timeouts, this is fairly cumbersome and prone to exhaust the connection pool if done incorrectly.
Definition of done
Trigger a server selection error by modifying the IP of the connected mongod/mongos process and ensure that a subsequent operation on the failed client succeeds and the underlying socket is recreated.
Pitfalls
What should the implementer watch out for? What are the risks?