|
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.
|