[SERVER-20902] Make RemoteCommandTargeter (and ReplicaSetMonitor) asynchronous Created: 13/Oct/15 Updated: 02/Nov/18 Resolved: 02/Nov/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kaloian Manassiev | Assignee: | Mathias Stearn |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
The RemoteCommandTargeter implementation builds on top of the ReplicaSetMonitor and exposes a synchronous findHost call, which may block on network 'isMaster' call if a master host is not yet known, or if it has been deemed unavailable. We use findHost in various places where blocking is undesirable (such as while holding the AsyncResultsMerger's mutex). We should make findHost support asynchronous interface so that if a host of certain read preference is not yet available it will not block, but give an event which can be listened on. |
| Comments |
| Comment by Gregory McKeon (Inactive) [ 06/Aug/18 ] |
|
When we close PM-1085 will send back to needs triage to see if there's more to do for the RemoteCommandTargeter. |