[JAVA-1780] A socket will be returned to the pool in an undefined state if an Error subclass is thrown while reading from it Created: 23/Apr/15  Updated: 05/Jan/18  Resolved: 27/Apr/15

Status: Closed
Project: Java Driver
Component/s: Connection Management
Affects Version/s: 2.13.1
Fix Version/s: 2.13.2, 2.14.0

Type: Bug Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Done Votes: 0
Labels: cs
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Case:

 Description   

Error sub-classes thrown within the DBTCPConnector.innerCall method's try block are not caught like RuntimeException subclasses are, which can result in the socket being returned to the pool in a partially read state.

This will likely result in a read from the middle of the previous response the next time the socket is checked out of the pool.



 Comments   
Comment by Jeffrey Yemin [ 28/May/15 ]

Fix released in 2.13.2.

Comment by Githook User [ 27/Apr/15 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: Catch Error subclass of Throwable to ensure that a socket in an undefined state is not returned to the pool.

JAVA-1780
Branch: 2.13.x
https://github.com/mongodb/mongo-java-driver/commit/1f8f13e6fcb7cd5cf201f622848561b0dedcb7df

Comment by Githook User [ 27/Apr/15 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: Catch Error subclass of Throwable to ensure that a socket in an undefined state is not returned to the pool.

JAVA-1780
Branch: 2.x
https://github.com/mongodb/mongo-java-driver/commit/4a0ec7572e22c456df75101e4ce7ec152f162ab3

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