|
Discussed with matt.diener@mongodb.com and george.wangensteen@mongodb.com – we decided that in order to keep in line with the way targeting works right now with the ARS, we will not specifically have a HedgedHostTargeter class that is distinct from our RemoteCommandHostTargeter.
Users of our API can choose to invoke the doHedgedRequest function as opposed to the doRequest function if they want to hedge their command when possible. It will be implicit that the vector of HostAndPorts returned from the targeter is to be used for hedging in doHedgedRequest and opportunistic targeting in doRequest.The fallback behavior (when the command is not eligible or hedging is turned off in the server params) in doHedgedRequest will be to send the command to just one node, although the codepath will be the same whether or not we are hedging (even for ReadPreference:PrimaryOnly).
|