question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HealthCheckedEndpointGroup should probably wait for connectTimeout before throwing exception.

See original GitHub issue

Currently, HttpHealthCheckedEndpointGroup will throw an EndpointGroupException immediately when a request is attempted when there are no endpoints. It would be more intuitive and simpler to use if it was possible for the request to wait until ClientFactory.connectTImeout() before throwing the exception, allowing a health checked endpoint group to have similar connection behavior as just a single endpoint.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
trustincommented, May 8, 2020

There are two things to fix for this issue:

  1. When selecting an Endpoint from an EndpointGroup, we need to wait up to certain amount of time (connect timeout) before raising an EmptyEndpointGroupException.
    • We need to add a variant of EndpointGroup.select() that requires a timeout value and returns a CompletableFuture<Endpoint>. The new method could be used when a) initializing a new context and b) RetryingClient chooses a new endpoint.
  2. Currently, on an EmptyEndpointGroupException, a request will always fail with a response whose failure cause is a UnprocessedRequestException, regardless of whether RetryingClient is present in a decorator chain or not. This behavior needs to change so that the successful re-attempts made by RetryingClient are passed to the caller.

Not sure this will be as easy as I described above (devils are always in details 😱). Any better ideas or traps I didn’t realize yet?

1reaction
trustincommented, Apr 19, 2020

I’d like to target this issue for 1.0 again given its impact.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Retrofit 2: Catch connection timeout exception - Stack Overflow
I personnaly tried increasing connection timeout but, evetually, it doesn't really solve the problem at its root. Besides, user is not supposed to...
Read more >
Exception handling issue - Help - UiPath Community Forum
When exception which is thrown by activity handled by catch block ,it ... will probably be waiting for its timeout period to expire...
Read more >
How to Throw Exceptions (The Java™ Tutorials > Essential ...
This Java tutorial describes exceptions, basic input/output, concurrency, regular expressions, and the platform environment.
Read more >
Coroutine exceptions handling | Kotlin
This section covers exception handling and cancellation on exceptions. We already know that a cancelled coroutine throws CancellationException ...
Read more >
Exception handling (Task Parallel Library) - Microsoft Learn
If a task is the parent of attached child tasks, or if you are waiting on multiple tasks, multiple exceptions could be thrown....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found