[SERVER-67002] Gracefully handle EINPROGRESS/WSAEINPROGRESS when calling connect() on a non-blocking socket Created: 03/Jun/22 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Blake Oler | Assignee: | Backlog - Service Architecture |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Service Arch
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Sprint: | Service Arch 2022-07-25 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 3 | ||||||||||||||||
| Description |
|
EINPROGRESS (WSAEINPROGRESS for Windows) indicates that a non-blocking socket's connection couldn't be established immediately – the connection is still being established at the point-in-time of the error. The manpages state that the proper next step when receiving this error is to call select on the socket to verify that a connection has been established. After this point, any such operation can continue as expected. As of current-day MongoDB, connection establishment code automatically fails on EINPROGRESS (as seen in the linked BFs). This ticket is to audit all places where we call connect() on a non-blocking socket and add the logic to catch EINPROGRESS and verify the socket's connectedness. |