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

RetryingChannel retries IOExceptions rather than all Throwables #644

Merged
merged 3 commits into from
Apr 14, 2020

Conversation

carterkozak
Copy link
Contributor

IOExceptions are thrown by clients when calls fail in unexpected
ways. Other exceptions indicate programming or system errors that
cannot be recovered from.

Before this PR

Burn retries on requests that cannot succeed.

After this PR

==COMMIT_MSG==
RetryingChannel retries IOExceptions rather than all Throwables
==COMMIT_MSG==

Possible downsides?

We may discover other exceptions that we do want to retry that aren't IOExceptions.

@changelog-app
Copy link

changelog-app bot commented Apr 14, 2020

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

RetryingChannel retries IOExceptions rather than all Throwables

Check the box to generate changelog(s)

  • Generate changelog entry

@ferozco
Copy link
Contributor

ferozco commented Apr 14, 2020

👍

@iamdanfox
Copy link
Contributor

SHouldn't we have some more test coverage for this?

@carterkozak
Copy link
Contributor Author

What do you envision?

@iamdanfox
Copy link
Contributor

iamdanfox commented Apr 14, 2020

I'm worried that we often have these quite specific unit tests that capture behaviour of a single class, but when we combine them all to make our big DialogueChannel we sometimes get unexpected behaviour.

Like for instance the Unable to make a request (queue is full) thing. Is that an intentional change that we're not retrying that anymore?

@carterkozak
Copy link
Contributor Author

heh, that one was the issue that prompted me to think about this :-) When our queue is full I think it's best to fail fast rather than dropping onto a second time-bounded queue.

Another example is when we send a GET with a body, we throw a SafeIllegalArgumentException which definitely shouldn't be retried.

@iamdanfox
Copy link
Contributor

Ok so I think either some kind of integration test that captures this, or a simulation test case that exercises it would be good.

IOExceptions are thrown by clients when calls fail in unexpected
ways. Other exceptions indicate programming or system errors that
cannot be recovered from.
@carterkozak carterkozak force-pushed the ckozak/only_retry_ioexception branch from 092109d to 045f8af Compare April 14, 2020 17:49
@carterkozak
Copy link
Contributor Author

testing was more involved than I anticipated, heh.

Copy link
Contributor

@iamdanfox iamdanfox left a comment

Choose a reason for hiding this comment

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

Thanks!

@bulldozer-bot bulldozer-bot bot merged commit 50da0c6 into develop Apr 14, 2020
@bulldozer-bot bulldozer-bot bot deleted the ckozak/only_retry_ioexception branch April 14, 2020 19:26
@svc-autorelease
Copy link
Collaborator

Released 1.18.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants