[SERVER-74102] Hedging options should only be available on `mongos` Created: 16/Feb/23 Updated: 28/Feb/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Amirsaman Memaripour | Assignee: | Backlog - Service Architecture |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Service Arch
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | Try running the following against a mongod server:
|
||||||||
| Participants: | |||||||||
| Description |
|
Hedging is controlled by the following server parameter, settable at both startup and runtime:
The parameter is mapped to a global atomic, defined here and initialized to enabled:
This server parameter, along with other mongos-specific parameters (e.g., loadBalancerPort), is packed with async_requests_sender:
However, there are non-mongos compilation units that link against this target. For example, the following makes hedging and other mongos-specific behavior available for mongod servers:
|
| Comments |
| Comment by Jason Chan [ 28/Feb/23 ] |
|
Note: We don't think this is specific to hedging options, as we expect there to be a set of parameters intended specifically for mongos that are actually allowed to be set on mongod, with untested behavior that may not have been thought through. |
| Comment by Amirsaman Memaripour [ 16/Feb/23 ] |
|
The original feature aimed to add hedging only to mongos servers: https://www.mongodb.com/docs/manual/core/read-preference-hedge-option/ If hedging is a desired behavior for mongod servers, we should explicitly enable that by separating hedging from mongos-specific code, and test the behavior on mongod as well. |
| Comment by Max Hirschhorn [ 16/Feb/23 ] |
|
What is the reason to disallow shards acting as routers (e.g. sharded $lookup) to hedge their requests the same way a mongos would? |