[DRIVERS-390] Call "ping" on a socket that has been idle for socketCheckIntervalMS Created: 14/Jun/17 Updated: 28/Oct/23 Resolved: 13/Nov/18 |
|
| Status: | Closed |
| Project: | Drivers |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Driver Compliance: |
|
||||||||||||||||||||
| Description |
|
Change to specification for single-threaded clients and the meaning of socketCheckIntervalMS. Before, single-threaded drivers were required to call "ismaster" on a socket that's been idle for socketCheckIntervalMS before using the socket. It was not clear what the driver should do with the ismaster response, or what it should do if ismaster failed. Instead, what the driver should do is re-check an idle socket right after server selection. If a server is selected that has an existing connection that's been idle for 5 seconds, the driver should attempt to call "ping", not ismaster, since we're not trying to update the topology. If "ping" succeeds, use the socket. If it failed, set the server's type to Unknown and re-enter server selection once, re-discovering the topology if needed (as SDAM already specifies), then proceed from there. |
| Comments |
| Comment by A. Jesse Jiryu Davis [ 14/Jun/17 ] |
|
I've marked most of the drivers "validated" if they're not single-threaded. I'll do the libmongoc update and the drivers that use libmongoc (in non-pooled mode) will get the fix for free when they upgrade. Perl definitely needs changes. I don't know if the socketCheckIntervalMS spec applies to mgo or Node driver. |