[CDRIVER-798] Async scan spins for 30 seconds after server hangup Created: 11/Aug/15 Updated: 19/Oct/16 Resolved: 01/Sep/15 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | 1.2-beta0 |
| Fix Version/s: | 1.2-beta1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Even with serverSelectionTryOnce true, if the server hangs up on an "ismaster" call, mongoc_async_run spins serverSelectionTimeoutMS (default 30 seconds) before giving up and returning to mongoc_topology_select. When mongoc_stream_read returns 0 it means the server has shut down the connection, but the 0 return is not properly handled so the async_cmd_t remains in the "receiving" phase. The socket appears readable so mongoc_async_run doesn't block on "poll", hence the 100% CPU spin until the timeout. |
| Comments |
| Comment by Githook User [ 11/Jan/16 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: Detects when server closes the connection on a call to ismaster. |
| Comment by Githook User [ 01/Sep/15 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: Detects when server closes the connection on a call to ismaster. |