[CDRIVER-739] minHeartbeatFrequencyMS can be overridden Created: 09/Jul/15 Updated: 03/May/17 Resolved: 11/Oct/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | 1.2.0 |
| Fix Version/s: | TBD |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
The Server Discovery And Monitoring Spec says a driver must wait at least minHeartbeatFrequencyMS (500ms, not configurable) between ismaster calls no matter what: If the C Driver is configured with a heartbeatFrequencyMS shorter than that, it can call ismaster more frequently. I think this MIN should be a MAX: |
| Comments |
| Comment by A. Jesse Jiryu Davis [ 11/Oct/16 ] | ||
|
It's correct, the formula first calculates the time left until heartbeatFrequencyMS expires:
Then it calculates the time left until minHeartbeatFrequencyMS:
Then it takes the minimum of the two. Even if threads are requesting scans very frequently, force_timeout is calculated to last until minHeartbeatFrequencyMS expires. |