-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.4
-
Component/s: None
-
None
-
Environment:mongodb 1.8
After the driver open a socket to mongos,we shutdown mongos and restart it,then write two record into mongos,the first one will lost.
We had set autoConnectRetry to true.
The driver check if ( _socket == null ) only,should it check _socket can works fine also?
There are some exceptions:
Caused by: com.mongodb.MongoException$Network: can't say something
at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:169) ~[mongo-java-driver-2.4-jar.jar:na]
at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:141) ~[mongo-java-driver-2.4-jar.jar:na]
at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:225) ~[mongo-java-driver-2.4-jar.jar:na]
at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:180) ~[mongo-java-driver-2.4-jar.jar:na]
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method) ~[na:1.6.0_16]
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) ~[na:1.6.0_16]
at java.net.SocketOutputStream.write(SocketOutputStream.java:136) ~[na:1.6.0_16]
at org.bson.io.PoolOutputBuffer.pipe(PoolOutputBuffer.java:113) ~[mongo-java-driver-2.4-jar.jar:na]
at com.mongodb.OutMessage.pipe(OutMessage.java:157) ~[mongo-java-driver-2.4-jar.jar:na]
at com.mongodb.DBPort.go(DBPort.java:92) ~[mongo-java-driver-2.4-jar.jar:na]
at com.mongodb.DBPort.go(DBPort.java:66) ~[mongo-java-driver-2.4-jar.jar:na]
at com.mongodb.DBPort.say(DBPort.java:61) ~[mongo-java-driver-2.4-jar.jar:na]
at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:155) ~[mongo-java-driver-2.4-jar.jar:na]
- depends on
-
JAVA-335 all connections to a server should get closed under certain types of exception
- Closed