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

Issue 12918044: s3: expose EventualConsistency

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by rog
Modified:
10 years, 8 months ago
Reviewers:
mp+180087, dimitern, niemeyer, gz
Visibility:
Public.

Description

s3: expose EventualConsistency By doing this, we allow test code external to goamz to adjust the timeout duration. It's particularly useful when running against s3test - by changing this we can reduce the time it takes to test launchpad.net/juju-core/environs/ec2 from 3 minutes to 6 seconds. An alternative to this CL is at https://codereview.appspot.com/12740044 https://code.launchpad.net/~rogpeppe/goamz/expose-consistency-strategy/+merge/180087 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : s3: expose EventualConsistency #

Patch Set 3 : s3: expose EventualConsistency #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -17 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M aws/attempt.go View 1 chunk +1 line, -2 lines 0 comments Download
M s3/export_test.go View 1 chunk +3 lines, -3 lines 1 comment Download
M s3/multi.go View 8 chunks +8 lines, -8 lines 0 comments Download
M s3/s3.go View 4 chunks +8 lines, -4 lines 0 comments Download

Messages

Total messages: 5
rog
Please take a look.
10 years, 8 months ago (2013-08-14 10:35:51 UTC) #1
dimitern
LGTM
10 years, 8 months ago (2013-08-14 10:38:06 UTC) #2
gz
LGTM.
10 years, 8 months ago (2013-08-14 10:38:32 UTC) #3
rog
Please take a look.
10 years, 8 months ago (2013-08-14 11:23:53 UTC) #4
niemeyer
10 years, 8 months ago (2013-08-14 13:25:28 UTC) #5
NOT LGTM

https://codereview.appspot.com/12918044/diff/8001/s3/export_test.go
File s3/export_test.go (right):

https://codereview.appspot.com/12918044/diff/8001/s3/export_test.go#newcode9
s3/export_test.go:9: func SetAttemptStrategy(s *aws.AttemptStrategy) {
A few issues here.

First, why wasn't this function exposed instead?  The term "Eventual
Consistency" means something very different from what this does, and the attempt
strategy also handles issues unrelated to the whatever model of consistency the
server chooses to implement.

It also feels like a poor idea to offer people the chance to tweak individual
parameters of the attempt strategy. People can easily change a single one of
them, and then if we choose to tweak the attempt strategy, it will produce
unintended results.

Finally, it still feels like a bad idea to expose this in the API, as it's an
internal implementation detail we may want to change to improve the reliability
of the package. Exposing it will mean we can not revamp what an implementation
strategy means.

Instead, I'd suggest understanding what you're really trying to do, and being
more precise in what you mean. What do you *really* need?  Shortening the
timeout?  Disabling retries altogether?  We can have a function that does the
specific action intended.
Sign in to reply to this message.

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