[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:
Depends
Duplicate
duplicates SERVER-35689 futurize the RSM API Closed
Related
related to SERVER-35688 Futurize the RSM implementation Closed
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.

Generated at Thu Feb 08 03:55:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.