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

SRV rescan interval incorrectly computes TTL and minimum time

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Unknown Unknown
    • None
    • None
    • None
    • None

    Description

      The SRV polling specification states:

      The rescanSRVIntervalMS value MUST be set to the lowest of the individual TTL values associated with the different SRV records in the most recent rescan, but MUST NOT be lower than 60 seconds. If a driver is unable to access the TTL values of SRV records, it MUST rescan every 60 seconds.

      libmongoc currently calculates the rescan interval as follows:

      topology->srv_polling_rescan_interval_ms = BSON_MAX (
            rr_data.min_ttl * 1000, MONGOC_TOPOLOGY_MIN_RESCAN_SRV_INTERVAL_MS);
      

      • The calculation should be the minimum.
      • Test that the behavior is fixed by mocking SRV responses with a short TTL.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: