[SERVER-68001] Implement base HedgedHostTargeter Created: 12/Jul/22  Updated: 26/Jul/22  Resolved: 26/Jul/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: George Wangensteen Assignee: Erin McNulty
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Sprint: Service Arch 2022-07-25
Participants:

 Description   

Add the interface for HedgedHostTargeter. Add an implementation of it that can be used for testing, that allows the creater of the targeter to specify which host and ports to target and set hedge options.



 Comments   
Comment by Erin McNulty [ 26/Jul/22 ]

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).

Generated at Thu Feb 08 06:09:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.