Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2058

heartbeatFrequencyMS is not validated as being less than minHeartbeatFrequencyMS

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.7.0
    • Affects Version/s: 1.6.0
    • Component/s: libmongoc, uri
    • None

      The SDAM spec states the following for heartbeatFrequencyMS:

      For both multi- and single-threaded drivers, the driver MUST NOT permit users to configure it less than minHeartbeatFrequencyMS (500ms).

      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?

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: