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

Include ConnectTimeoutException in timeout exceptions for rules #6107

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ikhoon
Copy link
Contributor

@ikhoon ikhoon commented Feb 18, 2025

Motivation:

CircuitBreakerRuleBuilder.onTimeException() and
RetryRuleBuilder.onTimeoutException() only handle Armeria's com.linecorp.armeria.common.TimeoutException. However, they do not treat Nettys ConnectTimeoutException` as a timeout.

Modifications:

  • Treat Netty's ConnectTimeoutException and ProxyConnectException("timeout") as a timeout for rules.

Result:

CircuitBreakerRuleBuilder.onTimeException() and RetryRuleBuilder.onTimeoutException() now work when a connection or proxy establishment is timed out.

Motivation:

`CircuitBreakerRuleBuilder.onTimeException()` and
`RetryRuleBuilder.onTimeoutException()` only handle Armeria's
`com.linecorp.armeria.common.TimeoutException`. Howerver, they do not
treat Netty`s `ConnectTimeoutException` as a timeout.

Modifitions:

- Treat Netty's `ConnectTimeoutException` and
  `ProxyConnectException("timeout")` as a timeout for rules.

Result:

`CircuitBreakerRuleBuilder.onTimeException()` and `RetryRuleBuilder.onTimeoutException()`
now work when a connection or proxy establishment is timed out.
@ikhoon ikhoon added the defect label Feb 18, 2025
@ikhoon ikhoon added this to the 1.32.0 milestone Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants