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

Issue 5989068: Adding retryOnExecuteError in HttpRequest to handle allow retries when there is an IOException (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years ago by rmistry
Modified:
12 years ago
Reviewers:
yanivi
Base URL:
https://google-http-java-client.googlecode.com/hg/
Visibility:
Public.

Description

This CL is to fix issue http://code.google.com/p/google-http-java-client/issues/detail?id=83 : Handling connection failure I decided only to use retries and not exponential backoff because BackoffPolicy is not really suited for this since it requires a statusCode to determine when it should be invoked. In this case HttpResponse will be null, I believe retries should be sufficient here. I also debugged HttpRequest.execute in eclipse and disconnected my network connection to see what would happen. LowLevelHttpRequest.execute threw an java.net.UnknownHostException (subclass of IOException).

Patch Set 1 #

Patch Set 2 : Minor fix #

Total comments: 26

Patch Set 3 : Addressing code review comments #

Patch Set 4 : Minor fix #

Patch Set 5 : Adding exception logging #

Unified diffs Side-by-side diffs Delta from patch set Stats (+167 lines, -33 lines) Patch
M google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java View 1 2 3 4 7 chunks +64 lines, -13 lines 0 comments Download
M google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java View 1 2 10 chunks +103 lines, -20 lines 0 comments Download

Messages

Total messages: 8
rmistry
12 years ago (2012-04-09 18:30:06 UTC) #1
yanivi
I haven't gotten a chance to review yet, but can you please also check how ...
12 years ago (2012-04-10 12:10:56 UTC) #2
rmistry
On 2012/04/10 12:10:56, yanivi wrote: > I haven't gotten a chance to review yet, but ...
12 years ago (2012-04-10 15:16:05 UTC) #3
yanivi
some tricky design questions... http://codereview.appspot.com/5989068/diff/1001/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java File google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java (right): http://codereview.appspot.com/5989068/diff/1001/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java#newcode180 google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java:180: private boolean retryOnExecuteError = false; ...
12 years ago (2012-04-17 13:15:39 UTC) #4
rmistry
http://codereview.appspot.com/5989068/diff/1001/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java File google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java (right): http://codereview.appspot.com/5989068/diff/1001/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java#newcode180 google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java:180: private boolean retryOnExecuteError = false; On 2012/04/17 13:15:40, yanivi ...
12 years ago (2012-04-18 11:33:54 UTC) #5
yanivi
just one design question, but otherwise looks good http://codereview.appspot.com/5989068/diff/1001/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java File google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java (right): http://codereview.appspot.com/5989068/diff/1001/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java#newcode857 google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java:857: executeException ...
12 years ago (2012-04-19 20:31:57 UTC) #6
rmistry
http://codereview.appspot.com/5989068/diff/1001/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java File google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java (right): http://codereview.appspot.com/5989068/diff/1001/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java#newcode857 google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java:857: executeException = e; On 2012/04/19 20:31:57, yanivi wrote: > ...
12 years ago (2012-04-20 11:19:54 UTC) #7
yanivi
12 years ago (2012-04-20 13:57:57 UTC) #8
LGTM
Sign in to reply to this message.

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