-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
Ryan reported seeing write exceptions to primary after bouncing both mongod servers.
I think the reason why you still get an exception from the primary is because we do not clean up all connections upon 1 failure.
Say you take down primary, 1 write may fail to it and make driver switch to the secondary (new primary).
All the connections to the old primary are dead but not marked as such.
When eventually driver switches back to 1st primary, it will use dead connections and that will make some write fail.
Usually dead connections are cleaned up quickly by reads since they retry 2 times.
I think we should close all connections to a host in case of certain exceptions (RST) AND a new master is elected, to avoid these errors.
There is a function in driver that does it but it's not wired in.
- is depended on by
-
JAVA-290 mongo driver should check whether socket still be available before use it?
- Closed