Skip to content
This repository has been archived by the owner on Feb 15, 2020. It is now read-only.

Issue #147 Utilize all the network bandwith when pulling data from S3 #153

Merged
merged 2 commits into from
Nov 23, 2015

Conversation

trink
Copy link
Contributor

@trink trink commented Nov 13, 2015

No description provided.

nr := bufio.NewReader(rc)
n, err := nr.WriteTo(os.Stdout)
if err != nil && err != io.EOF {
fmt.Fprintf(os.Stderr, "Error in attempt %d writing %s at offset %d: %s\n", attempt, s3Key, lastGoodOffset, err)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only time I have seen this fail is with a broken pipe... retry won't help so we should probably just exit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on aborting on failed write. It's unlikely to happen from something recoverable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now seeing other errors too "connection reset by peer" which we do want to retry
I will do some more testing and special case the broken pipe.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on Write? We definitely want to retry the Read....

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, if it can throw read or write errors, you should probably leave the retry :-/

mreid-moz added a commit that referenced this pull request Nov 23, 2015
Issue #147 Utilize all the network bandwith when pulling data from S3
@mreid-moz mreid-moz merged commit f556f1f into master Nov 23, 2015
@trink trink deleted the issue_147 branch April 5, 2016 16:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants