Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry failed client requests #1562

Merged
merged 3 commits into from Jun 23, 2017
Merged

Retry failed client requests #1562

merged 3 commits into from Jun 23, 2017

Commits on Jun 8, 2017

  1. Retry failed client requests

    In situations when the client fails with certain error codes,
    it should be able to retry the request. Ideally, it would
    retry the request to a different host so that in the event that
    an instance malfunctioned or was removed, the request wasn't
    consistently failing.
    PtrTeixeira committed Jun 8, 2017
    Copy the full SHA
    08dfeeb View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2017

  1. Respond to PR comments

    In particular, make retry more configurable by allowing the user to set
    the number of attempts and the strategy to determine whether a response
    should be retried. Also explicitly disabled retries on the request, so
    that it would be entirely handled within the Guava retryer. The reason
    that retries within the HttpClient can't be re-used is that doing so
    would just retry the given HttpRequest, and this needs to be able to
    alter the HttpRequest between attempts. Also is a little more careful
    about retrying to different hosts on requests.
    PtrTeixeira committed Jun 9, 2017
    Copy the full SHA
    57fe03b View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2017

  1. Don't re-run url builder

    I was doing something that looked like
    ```
    url = hostToUrl(host)
    actualUrl = hostToUrl(url)
    ```
    which was very obviously wrong. This fixes it so that
    it only builds the URL once, which is the correct
    write way to do this.
    PtrTeixeira committed Jun 20, 2017
    Copy the full SHA
    bdd1008 View commit details
    Browse the repository at this point in the history