You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried this with a handful of CNAMEs and they all seem to fail regardless of TTL.
Honestly, I'm fuzzy on how caching in the DNS spec works with CNAMEs, so maybe this is working as intended. It seems like maybe the native JVM dns resolver work similarly (still investigating that, but just based on how long subsequent queries take it might not be?).
The text was updated successfully, but these errors were encountered:
Thanks, I'll need to investigate that and read up on TTLs too. At first glance though, line 505 should probably just check for .isCNAME() / .isDNAME() as well.
Made a POC PR with your suggestion and it does seem to roughly work from my manual testing.
For TTLs it seems that each record is supposed to have its own TTL. I'm not sure what that means for a client, maybe it should just take the min TTL, I'm not sure. Haven't looked into the Cache internals to see how it handles TTLs yet.
For example, given a cache like:
And a call like this with a LookupSession from the default builder (which has a Cache):
When it hits lookupWithRecords here:
dnsjava/src/main/java/org/xbill/DNS/lookup/LookupSession.java
Lines 470 to 475 in 6204b0e
c.lookupRecords
finds the entry, butsetResponseToMessageFuture
converts it to null, because the response wasn't 'successful' as per this:dnsjava/src/main/java/org/xbill/DNS/lookup/LookupSession.java
Lines 495 to 513 in 6204b0e
I've tried this with a handful of CNAMEs and they all seem to fail regardless of TTL.
Honestly, I'm fuzzy on how caching in the DNS spec works with CNAMEs, so maybe this is working as intended. It seems like maybe the native JVM dns resolver work similarly (still investigating that, but just based on how long subsequent queries take it might not be?).
The text was updated successfully, but these errors were encountered: