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

Issue 13632056: Reduce unnecessary s3 timeouts (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years ago by wallyworld
Modified:
12 years ago
Reviewers:
mp+185988, thumper
Visibility:
Public.

Description

Reduce unnecessary s3 timeouts This branch deals with the issue of Get() and List() retries being done separately in different places. The s3 library always retries regardless of whether such an action is necessary, and the ec2 provider also has its own retry mechanism. Both are unnecessary. The retry logic belongs at the application layer level where a sensible decision can be made as to how and when to do it. New environs helper methods are introduced: - Get() and GetDefault() - List() and ListDefault() I wanted to have these defined in an environs.storage package but because of the (unnecessary) definition of *all* the environs interfaces in the top level environs package I couldn't do it due to import loops. Live ec2 tests pass. The next step is to build on this work to make the tools querying code smarter at bootstrap time. https://code.launchpad.net/~wallyworld/juju-core/reduce-timeouts/+merge/185988 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 9

Patch Set 2 : Reduce unnecessary s3 timeouts #

Patch Set 3 : Reduce unnecessary s3 timeouts #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+760 lines, -524 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/upgradejuju.go View 1 2 chunks +2 lines, -1 line 0 comments Download
M cmd/juju/upgradejuju_test.go View 1 5 chunks +5 lines, -5 lines 0 comments Download
M environs/bootstrap/bootstrap.go View 1 1 chunk +1 line, -11 lines 0 comments Download
M environs/bootstrap/bootstrap_test.go View 1 4 chunks +7 lines, -6 lines 0 comments Download
M environs/emptystorage.go View 1 3 chunks +14 lines, -8 lines 0 comments Download
M environs/emptystorage_test.go View 1 4 chunks +6 lines, -5 lines 0 comments Download
M environs/filestorage/filestorage.go View 1 6 chunks +14 lines, -9 lines 0 comments Download
M environs/filestorage/filestorage_test.go View 1 4 chunks +5 lines, -5 lines 0 comments Download
M environs/interface.go View 1 2 chunks +3 lines, -57 lines 0 comments Download
M environs/jujutest/livetests.go View 1 4 chunks +6 lines, -5 lines 0 comments Download
M environs/jujutest/tests.go View 1 5 chunks +10 lines, -17 lines 0 comments Download
M environs/localstorage/storage.go View 1 6 chunks +18 lines, -13 lines 0 comments Download
M environs/localstorage/storage_test.go View 1 8 chunks +30 lines, -30 lines 0 comments Download
M environs/open.go View 1 2 chunks +3 lines, -2 lines 0 comments Download
M environs/sshstorage/storage.go View 1 7 chunks +14 lines, -9 lines 0 comments Download
M environs/sshstorage/storage_test.go View 1 7 chunks +30 lines, -30 lines 0 comments Download
A environs/storage/interfaces.go View 1 2 1 chunk +68 lines, -0 lines 0 comments Download
M environs/storage/storage.go View 1 5 chunks +37 lines, -4 lines 0 comments Download
M environs/storage/storage_test.go View 1 4 chunks +103 lines, -12 lines 0 comments Download
M environs/sync/sync.go View 1 8 chunks +8 lines, -8 lines 0 comments Download
M environs/sync/sync_test.go View 1 2 chunks +2 lines, -1 line 0 comments Download
M environs/testing/storage.go View 1 2 chunks +3 lines, -3 lines 0 comments Download
M environs/testing/tools.go View 1 6 chunks +16 lines, -15 lines 0 comments Download
M environs/tools/legacytools.go View 1 2 chunks +4 lines, -4 lines 0 comments Download
M environs/tools/simplestreams.go View 1 2 chunks +3 lines, -3 lines 0 comments Download
M environs/tools/storage.go View 1 3 chunks +7 lines, -7 lines 0 comments Download
M environs/tools/tools.go View 1 2 chunks +2 lines, -1 line 0 comments Download
M environs/tools/tools_test.go View 1 4 chunks +4 lines, -3 lines 2 comments Download
M provider/azure/environ.go View 1 5 chunks +7 lines, -6 lines 0 comments Download
M provider/azure/environ_test.go View 1 3 chunks +3 lines, -2 lines 0 comments Download
M provider/azure/storage.go View 1 3 chunks +8 lines, -3 lines 0 comments Download
M provider/azure/storage_test.go View 1 7 chunks +8 lines, -7 lines 0 comments Download
M provider/dummy/environs.go View 1 4 chunks +7 lines, -6 lines 0 comments Download
M provider/dummy/storage.go View 1 6 chunks +21 lines, -16 lines 0 comments Download
M provider/ec2/config_test.go View 1 1 chunk +2 lines, -2 lines 0 comments Download
M provider/ec2/ec2.go View 1 7 chunks +13 lines, -12 lines 0 comments Download
M provider/ec2/export_test.go View 1 4 chunks +11 lines, -5 lines 0 comments Download
M provider/ec2/httpstorage/httpstorage.go View 1 6 chunks +13 lines, -8 lines 0 comments Download
M provider/ec2/httpstorage/httpstorage_test.go View 1 3 chunks +3 lines, -2 lines 0 comments Download
M provider/ec2/live_test.go View 1 6 chunks +7 lines, -6 lines 0 comments Download
M provider/ec2/local_test.go View 1 chunk +0 lines, -2 lines 0 comments Download
M provider/ec2/storage.go View 1 10 chunks +65 lines, -22 lines 0 comments Download
M provider/local/environ.go View 1 2 chunks +3 lines, -2 lines 0 comments Download
M provider/maas/environ.go View 1 4 chunks +6 lines, -5 lines 0 comments Download
M provider/maas/environ_test.go View 1 3 chunks +3 lines, -2 lines 0 comments Download
M provider/maas/storage.go View 1 4 chunks +10 lines, -5 lines 0 comments Download
M provider/maas/storage_test.go View 1 13 chunks +72 lines, -72 lines 0 comments Download
M provider/openstack/export_test.go View 1 2 chunks +3 lines, -2 lines 0 comments Download
M provider/openstack/live_test.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M provider/openstack/local_test.go View 1 3 chunks +12 lines, -11 lines 0 comments Download
M provider/openstack/provider.go View 1 9 chunks +13 lines, -12 lines 0 comments Download
M provider/openstack/storage.go View 1 8 chunks +19 lines, -17 lines 0 comments Download
M provider/state.go View 1 4 chunks +6 lines, -5 lines 0 comments Download
M provider/state_test.go View 1 4 chunks +16 lines, -16 lines 0 comments Download

Messages

Total messages: 7
wallyworld
Please take a look.
12 years ago (2013-09-17 08:59:24 UTC) #1
thumper
https://codereview.appspot.com/13632056/diff/1/cmd/juju/upgradejuju_test.go File cmd/juju/upgradejuju_test.go (right): https://codereview.appspot.com/13632056/diff/1/cmd/juju/upgradejuju_test.go#newcode364 cmd/juju/upgradejuju_test.go:364: r, err := environs.DefaultGet(s.Conn.Environ.Storage(), envtools.StorageName(vers)) Hmm... this line took ...
12 years ago (2013-09-18 02:50:55 UTC) #2
wallyworld
Please take a look. https://codereview.appspot.com/13632056/diff/1/environs/bootstrap/bootstrap.go File environs/bootstrap/bootstrap.go (right): https://codereview.appspot.com/13632056/diff/1/environs/bootstrap/bootstrap.go#newcode99 environs/bootstrap/bootstrap.go:99: _, err = provider.LoadState(storage) On ...
12 years ago (2013-09-18 07:29:16 UTC) #3
wallyworld
Please take a look.
12 years ago (2013-09-18 07:30:45 UTC) #4
thumper
A big +1 on the interface move. I'm happy to give this a LGTM, but ...
12 years ago (2013-09-18 22:10:48 UTC) #5
wallyworld
On 2013/09/18 22:10:48, thumper wrote: > A big +1 on the interface move. > > ...
12 years ago (2013-09-18 22:55:02 UTC) #6
wallyworld
12 years ago (2013-09-18 22:55:51 UTC) #7
https://codereview.appspot.com/13632056/diff/11001/environs/tools/tools_test.go
File environs/tools/tools_test.go (right):

https://codereview.appspot.com/13632056/diff/11001/environs/tools/tools_test....
environs/tools/tools_test.go:83: storage :=
s.env.PublicStorage().(storage.Storage)
On 2013/09/18 22:10:49, thumper wrote:
> I don't think this will work. Or if it does work, it is slightly confusing. 
If
> Go used a different namespace separator from a method call, there would never
be
> confusion between variables and packages.

Ah, I already changed a bunch of these. I missed some. Thanks, will fix. I also
found a few more.
Sign in to reply to this message.

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