You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Ryan Schmitt <rs...@apache.org> on 2020/01/28 23:11:19 UTC

"defaultRetryInterval must not be negative or zero"

Why does DefaultHttpRequestRetryStrategy require a retry interval greater
than 0?

Re: "defaultRetryInterval must not be negative or zero"

Posted by Ryan Schmitt <rs...@apache.org>.
To pass 0ms, I can just use `TimeValue.ZERO_MILLISECONDS`. Handy dandy!

On Wed, Jan 29, 2020 at 10:43 AM Michael Osipov <mi...@apache.org> wrote:

> Am 2020-01-29 um 18:50 schrieb Oleg Kalnichevski:
> > On Wed, 2020-01-29 at 07:50 -0800, Ryan Schmitt wrote:
> >> You may recall from middle school that "greater than zero" means that
> >> zero
> >> is not a legal value. Why can't I pass in a zero interval in order to
> >> signal that I want retries to be performed immediately?
> >>
> >
> > I do not think it was intentional. Please just go ahead and patch it.
> Ryan,
>
> Take documentation (update) into account as well. But frankly, is there
> any difference for you between 0 s and 1 ms??
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>

Re: "defaultRetryInterval must not be negative or zero"

Posted by Michael Osipov <mi...@apache.org>.
Am 2020-01-29 um 18:50 schrieb Oleg Kalnichevski:
> On Wed, 2020-01-29 at 07:50 -0800, Ryan Schmitt wrote:
>> You may recall from middle school that "greater than zero" means that
>> zero
>> is not a legal value. Why can't I pass in a zero interval in order to
>> signal that I want retries to be performed immediately?
>>
> 
> I do not think it was intentional. Please just go ahead and patch it.
Ryan,

Take documentation (update) into account as well. But frankly, is there 
any difference for you between 0 s and 1 ms??

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: "defaultRetryInterval must not be negative or zero"

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2020-01-29 at 07:50 -0800, Ryan Schmitt wrote:
> You may recall from middle school that "greater than zero" means that
> zero
> is not a legal value. Why can't I pass in a zero interval in order to
> signal that I want retries to be performed immediately?
> 

I do not think it was intentional. Please just go ahead and patch it.

Cheers

Oleg


> On Wed, Jan 29, 2020 at 6:07 AM Gary Gregory <ga...@gmail.com>
> wrote:
> 
> > On Tue, Jan 28, 2020 at 6:11 PM Ryan Schmitt <rs...@apache.org>
> > wrote:
> > 
> > > Why does DefaultHttpRequestRetryStrategy require a retry interval
> > > greater
> > > than 0?
> > > 
> > 
> > When you pass in a negative time value to one of the constructors,
> > it
> > causes the virtual machine to try travel back in time by colliding
> > matter
> > and anti-matter causing the universe to annihilate.
> > 
> > Gary
> > 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: "defaultRetryInterval must not be negative or zero"

Posted by Ryan Schmitt <rs...@apache.org>.
You may recall from middle school that "greater than zero" means that zero
is not a legal value. Why can't I pass in a zero interval in order to
signal that I want retries to be performed immediately?

On Wed, Jan 29, 2020 at 6:07 AM Gary Gregory <ga...@gmail.com> wrote:

> On Tue, Jan 28, 2020 at 6:11 PM Ryan Schmitt <rs...@apache.org> wrote:
>
> > Why does DefaultHttpRequestRetryStrategy require a retry interval greater
> > than 0?
> >
>
> When you pass in a negative time value to one of the constructors, it
> causes the virtual machine to try travel back in time by colliding matter
> and anti-matter causing the universe to annihilate.
>
> Gary
>

Re: "defaultRetryInterval must not be negative or zero"

Posted by Gary Gregory <ga...@gmail.com>.
On Tue, Jan 28, 2020 at 6:11 PM Ryan Schmitt <rs...@apache.org> wrote:

> Why does DefaultHttpRequestRetryStrategy require a retry interval greater
> than 0?
>

When you pass in a negative time value to one of the constructors, it
causes the virtual machine to try travel back in time by colliding matter
and anti-matter causing the universe to annihilate.

Gary