[JAVA-4360] Should ignore empty SRV polling results Created: 19/Oct/21  Updated: 23/Apr/23

Status: Backlog
Project: Java Driver
Component/s: Cluster Management
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Jeffrey Yemin Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The specification says:

If the DNS request returns no verified hosts in SRV records, no SRV records at all, or a DNS error happens, the driver:

  • MUST NOT change the topology
  • MUST NOT raise an error
  • SHOULD log this situation, including the reason why the DNS records could not be found, if possible
  • MUST temporarily set rescanSRVIntervalMS to heartbeatFrequencyMS until at least one verified SRV record is obtained.

 
The driver does not implement this behavior, nor the prose test that asserts it.

 



 Comments   
Comment by Jeffrey Yemin [ 17/Dec/21 ]

Taking a closer look at DefaultDnsSrvRecordMonitor.DnsSrvRecordMonitorRunnable#run, it now seems that some of this behavior is actually implemented. After the initial look is complete, and it's just polling, the topology is not changed, and the exception is logged at INFO level.

The only thing not done, it appears, is:

  • MUST temporarily set rescanSRVIntervalMS to heartbeatFrequencyMS until at least one verified SRV record is obtained.

plus the prose test.

Generated at Thu Feb 08 09:01:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.