Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(71)

Issue 6949044: state: add retry delay during mongo connection (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by TheMue
Modified:
11 years, 2 months ago
Reviewers:
jameinel, mp+139745, dave, fwereade, niemeyer, rog
Visibility:
Public.

Description

state: add retry delay during mongo connection If the connection to the mongo state database fails, e.g. while the system is still bootstrapping, the system immediately retries to connect until timeout. This change adds an increasing delay between those retries. https://code.launchpad.net/~themue/juju-core/006-state-retry-delay/+merge/139745 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : state: add retry delay during mongo connection #

Total comments: 1

Patch Set 3 : state: add retry delay during mongo connection #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -25 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M juju/conn.go View 1 2 1 chunk +3 lines, -2 lines 1 comment Download
M trivial/attempt.go View 1 2 3 chunks +22 lines, -4 lines 5 comments Download
M trivial/trivial_test.go View 1 2 1 chunk +90 lines, -19 lines 2 comments Download

Messages

Total messages: 21
TheMue
Please take a look.
11 years, 4 months ago (2012-12-13 17:00:44 UTC) #1
dave_cheney.net
On 2012/12/13 17:00:44, TheMue wrote: > Please take a look. This looks reasonable, but why ...
11 years, 4 months ago (2012-12-13 21:08:25 UTC) #2
TheMue
On 2012/12/13 21:08:25, dfc wrote: > On 2012/12/13 17:00:44, TheMue wrote: > > Please take ...
11 years, 4 months ago (2012-12-13 21:11:05 UTC) #3
dave_cheney.net
Here ya go http://godoc.org/launchpad.net/juju-core/trivial#Attempt There are examples all the way through the goose and juju-core ...
11 years, 4 months ago (2012-12-13 21:16:44 UTC) #4
TheMue
On 2012/12/13 21:16:44, dfc wrote: > Here ya go http://godoc.org/launchpad.net/juju-core/trivial#Attempt Great, thx, missed it. Interesting ...
11 years, 4 months ago (2012-12-13 21:24:50 UTC) #5
TheMue
Please take a look.
11 years, 4 months ago (2012-12-14 09:02:44 UTC) #6
fwereade
LGTM
11 years, 4 months ago (2012-12-17 07:59:06 UTC) #7
jameinel
Your overview says it adds "increasing delay", but AttemptStrategy seems to do a fixed delay. ...
11 years, 4 months ago (2012-12-17 09:58:24 UTC) #8
dave_cheney.net
NOT LGTM. There is already a retry loop in the juju.Conn, why are we adding ...
11 years, 4 months ago (2012-12-17 10:00:32 UTC) #9
TheMue
On 2012/12/17 10:00:32, dfc wrote: > NOT LGTM. > > There is already a retry ...
11 years, 4 months ago (2012-12-17 10:04:37 UTC) #10
dave_cheney.net
Check out juju.Conn. On Mon, Dec 17, 2012 at 9:04 PM, <themue@gmail.com> wrote: > On ...
11 years, 4 months ago (2012-12-17 10:05:34 UTC) #11
TheMue
On 2012/12/17 10:05:34, dfc wrote: > Check out juju.Conn. > > On Mon, Dec 17, ...
11 years, 4 months ago (2012-12-17 10:08:34 UTC) #12
TheMue
On 2012/12/17 10:08:34, TheMue wrote: > On 2012/12/17 10:05:34, dfc wrote: > > Check out ...
11 years, 4 months ago (2012-12-18 07:43:22 UTC) #13
dave_cheney.net
On 18/12/2012, at 18:43, themue@gmail.com wrote: > On 2012/12/17 10:08:34, TheMue wrote: >> On 2012/12/17 ...
11 years, 4 months ago (2012-12-18 08:25:36 UTC) #14
dave_cheney.net
Hi frank, I though you were on vacation? If so, this can easily wait til ...
11 years, 4 months ago (2012-12-18 08:26:00 UTC) #15
TheMue
Please take a look.
11 years, 3 months ago (2013-01-17 11:22:45 UTC) #16
fwereade
LGTM. https://codereview.appspot.com/6949044/diff/12001/trivial/attempt.go File trivial/attempt.go (right): https://codereview.appspot.com/6949044/diff/12001/trivial/attempt.go#newcode56 trivial/attempt.go:56: a.delay = time.Duration(1.2 * float64(a.delay)) What motivated the ...
11 years, 3 months ago (2013-01-17 14:28:21 UTC) #17
rog
NOT LGTM. i don't believe this will fix the problem, as discussed online and outlined ...
11 years, 3 months ago (2013-01-17 16:38:44 UTC) #18
rog
a few comments on the attempt changes. https://codereview.appspot.com/6949044/diff/12001/trivial/attempt.go File trivial/attempt.go (right): https://codereview.appspot.com/6949044/diff/12001/trivial/attempt.go#newcode12 trivial/attempt.go:12: LinearInterval when ...
11 years, 3 months ago (2013-01-17 17:05:00 UTC) #19
niemeyer
Copy from the respective email thread: On Fri, Jan 18, 2013 at 8:20 AM, roger ...
11 years, 3 months ago (2013-01-18 12:02:09 UTC) #20
rog
11 years, 3 months ago (2013-01-18 12:58:52 UTC) #21
On 18 January 2013 12:02,  <n13m3y3r@gmail.com> wrote:
> Copy from the respective email thread:
>
> On Fri, Jan 18, 2013 at 8:20 AM, roger peppe <roger.peppe@canonical.com>
> wrote:
>>>
>>> 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.
>
>
> mgo doesn't retry every 250ms..

True. mgo seems to try about three times every 500ms,
averaging once every 185ms.

http://play.golang.org/p/f4XEMFXKDz

> Unless someone wants to propose that trivial branch, there are much
> more important things to be doing than fine tuning how fast we connect
> (!!!).

I agree with that.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b