Skip Menu |

This queue is for tickets about the Net-DNS CPAN distribution.

Report information
The Basics
Id: 109183
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: Mark.Martinec [...] ijs.si
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.03
Fixed in: (no value)



Subject: Semantics of "retry" and "retrans" options has changed with 1.03
1) A meaning of a "retry" option in Net::DNS::Resolver::new has changed between versions 1.02 and 1.03, while its documentations remains unchanged: retry print 'number of tries: ', $resolver->retry, "\n"; $resolver->retry(2); Get or set the number of times to try the query. The default is 4. Actually the "retry" in 1.02 and earlier meant the number of attempts (=tries, i.e. 4 transmissions, at its default value of 4), while with 1.03 the number of transmissions is one more, i.e. the semantics became: 1 first transmission + "retry" repeats, total of 5. The change is undocumented, and is unfortunate, as what could previously be achieved by retry=>1, retrans=>5 -> one send and a 5 second timeout, now became two sends with a total of 15 second timeout (5+10) on an unresponsive DNS server. 2) a meaning of "retrans" has changed too: in 1.02 and earlier one could achieve a single send and a one second timeout (waiting for a reply) by setting retry=>1, retrans=>0. Now with 1.03 the same setting causes rapid firing of retry+1 UDP packets and zero wait time, so in practice no answer is received unless the information is already in a cache of a fast and close DNS resolver. The documentation states: retrans Get or set the retransmission interval The default is 5 seconds. which does not mention doubling the interval with each attempt, and does not say that the last (again doubled) interval is the final timeout.
Thank you for reporting Mark, I will address this asap too. On Thu 19 Nov 2015 20:12:10, Mark.Martinec@ijs.si wrote: Show quoted text
> 1) A meaning of a "retry" option in Net::DNS::Resolver::new has changed > between versions 1.02 and 1.03, while its documentations remains unchanged: > > retry > print 'number of tries: ', $resolver->retry, "\n"; > $resolver->retry(2); > Get or set the number of times to try the query. The default is 4. > > Actually the "retry" in 1.02 and earlier meant the number of > attempts (=tries, i.e. 4 transmissions, at its default value of 4), > > while with 1.03 the number of transmissions is one more, i.e. the > semantics became: 1 first transmission + "retry" repeats, total of 5. > > The change is undocumented, and is unfortunate, as what could previously > be achieved by retry=>1, retrans=>5 -> one send and a 5 second timeout, > now became two sends with a total of 15 second timeout (5+10) on > an unresponsive DNS server. > > > 2) a meaning of "retrans" has changed too: in 1.02 and earlier > one could achieve a single send and a one second timeout > (waiting for a reply) by setting retry=>1, retrans=>0. > > Now with 1.03 the same setting causes rapid firing of retry+1 > UDP packets and zero wait time, so in practice no answer is > received unless the information is already in a cache of a > fast and close DNS resolver. > > The documentation states: > > retrans > Get or set the retransmission interval The default is 5 seconds. > > which does not mention doubling the interval with each attempt, > and does not say that the last (again doubled) interval is the > final timeout.
From: rwfranks [...] acm.org
Historical behaviour restored in 1.04 Its correctness or otherwise is an open question and not the issue here.