Discussion about retry in state.Open()
roger peppe
roger.peppe at canonical.com
Fri Jan 18 10:20:57 UTC 2013
> Alternatively, lets just change the retry delay in juju.Conn to 1 second an call it a day.
As I've tried to point out above, the retry delay in juju.Conn is irrelevant.
In all the live tests I've seen, I've never seen that delay being
exercised - it's
a highly unusual corner case.
The right fix is in mgo.
On 17 January 2013 22:37, David Cheney <david.cheney at canonical.com> wrote:
> HI Folks,
>
> Lets just drop this issue, it's consumed so much of everyones time and honestly doesn't feel like the most important thing on the board.
>
> Alternatively, lets just change the retry delay in juju.Conn to 1 second an call it a day.
>
> Dave
>
>
> On Friday, 18 January 2013 at 7:18 AM, Frank Mueller wrote:
>
>> Hello Dave,
>>
>> today I've re-proposed the CL with an exponential interval behavior. Beside improvement hints regarding the behavior (adding a random factor to avoid a large number of clients reconnecting with the same strategy) he rejected the proposal. Justifiably he suggested moving this retry even lower to the MongoDB level.
>>
>> I would like you to review https://codereview.appspot.com/6949044/ too, especially regarding Rogers comments. I tested it with "east" and "southeast" and it worked fine, like the previous attempt in state.Open(). There we use mgo.DialWithInfo() with a timeout. Adding the AttemptStrategy there to the dial lambda avoids to change the DialWithInfo() itself.
>>
>> Looking forward to your answer.
>>
>> Thx mue
>>
>>
>> > Hi Frank,
>> >
>> > Now I've paged back in everything about this issue. The problem is that there is already a retry loop inside juju.Conn, but its retry timer is set to 250 milli seconds. I think the solution is to raise that timer to maybe a second or two, and possibly introduce exponential back off starting at 1 second, and raising to 5 seconds after a time.
>> >
>> > Cheers
>> >
>> > Dave
>> >
>> >
>> > On Monday, 14 January 2013 at 8:44 PM, Frank Mueller wrote:
>> >
>> > > Hi Dave,
>> > >
>> > > no problem and thank you for the short note.
>> > >
>> > > CU mue
>> > >
>> > > > Hi Frank,
>> > > >
>> > > > Sorry for the delay. I had it on my to do list to reply to you today, but I ran out of time. I will reply tomorrow morning, first thing.
>> > > >
>> > > > Cheers
>> > > >
>> > > > Dave
>> > > >
>> > > >
>> > > > On Friday, 11 January 2013 at 3:19 AM, Frank Mueller wrote:
>> > > >
>> > > > > Hi Dave,
>> > > > >
>> > > > > we still have https://codereview.appspot.com/6949044/ open. I added a card for it and assigned it to us both. You said you have an argument against the usage of the AttemptStrategy. I would like to finish it so maybe you can tell me more about your idea.
>> > > > >
>> > > > > Thx mue
>> > > > >
>> > > > > --
>> > > > > ** Frank Mueller <frank.mueller at canonical.com (mailto:frank.mueller at canonical.com)>
>> > > > > ** Software Engineer - Juju Development
>> > > > > ** Canonical
>> > > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > --
>> > > ** Frank Mueller <frank.mueller at canonical.com (mailto:frank.mueller at canonical.com)>
>> > > ** Software Engineer - Juju Development
>> > > ** Canonical
>> >
>>
>>
>>
>> --
>> ** Frank Mueller <frank.mueller at canonical.com (mailto:frank.mueller at canonical.com)>
>> ** Software Engineer - Juju Development
>> ** Canonical
>
>
>
>
> --
> Juju-dev mailing list
> Juju-dev at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
More information about the Juju-dev
mailing list