[CDRIVER-2058] heartbeatFrequencyMS is not validated as being less than minHeartbeatFrequencyMS Created: 16/Feb/17 Updated: 11/Sep/19 Resolved: 22/Mar/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc, uri |
| Affects Version/s: | 1.6.0 |
| Fix Version/s: | 1.7.0 |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | Jeremy Mikola | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
The SDAM spec states the following for heartbeatFrequencyMS:
MONGOC_TOPOLOGY_MIN_HEARTBEAT_FREQUENCY_MS is defined as 500, but that value is never used to validate the heartbeatFrequencyMS option. It is only referenced mongoc_topology_select_server_id() for computing the allowed scan time in single-threaded mode and _mongoc_topology_run_background() when computing a shorter interval for a requested scan. Should libmongoc report some error when a value smaller than 500 is specified for heartbeatFrequencyMS? Alternatively, are invalid heartbeatFrequencyMS values ignored based on the aforementioned topology scanner code, which references MONGOC_TOPOLOGY_MIN_HEARTBEAT_FREQUENCY_MS? |
| Comments |
| Comment by Githook User [ 22/Mar/17 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: |
| Comment by A. Jesse Jiryu Davis [ 21/Feb/17 ] |
|
Reading the code for mongoc_topology_select_server_id there's some question about whether we're up to spec at all. We should wait MAX(minheartbeatfrequency, heartbeatfrequency) between server checks, but it looks like we wait minheartbeatfrequency + heartbeatfrequency? Additionally, as Jeremy says, it should be an error to specify: mongodb://host/?heartbeatfrequencyms=1 |
| Comment by Jeremy Mikola [ 16/Feb/17 ] |
|
Cross-referencing with |