[CDRIVER-2081] Use select() on Windows Created: 08/Mar/17  Updated: 12/Sep/17  Resolved: 24/Aug/17

Status: Closed
Project: C Driver
Component/s: libmongoc, network
Affects Version/s: None
Fix Version/s: 1.8.0

Type: New Feature 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

Issue Links:
Related
is related to CDRIVER-2251 Use select() on Unix where poll() is ... Closed

 Description   

It would let us detect failed connections immediately, instead of waiting for the connect timeout (10 seconds) or, much worse, the socket timeout when we lose an established connection (5 minutes).

https://daniel.haxx.se/blog/2012/10/10/wsapoll-is-broken/



 Comments   
Comment by Ramon Fernandez Marina [ 12/Sep/17 ]

Author:

{'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}

Message:CDRIVER-2081 use select() on Windows

WSAPoll doesn't detect connection resets, and forces us to wait for a
timeout on Windows even when the server actively refused the connection.
Use select() instead: it detects resets, and on Windows doesn't have the
maximum file descriptor limit it has on Unix.

daniel.haxx.se/blog/2012/10/10/wsapoll-is-broken
msdn.microsoft.com/en-us/library/windows/desktop/ms740142.aspx
Branch:master
https://github.com/mongodb/mongo-c-driver/commit/12e643af657f5ece3ef9a800fa1d5231160add13

Comment by A. Jesse Jiryu Davis [ 29/Jun/17 ]

No Bernie, that limit isn't on Windows.

I'll consider a config check for using select if "poll" is absent.

Comment by Bernie Hackett [ 08/Mar/17 ]

Do you have to worry about processes that have > 1023 open file descriptors? If yes, select is a problem.

Generated at Wed Feb 07 21:14:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.