Skip to content

[Backport] ServiceClient: More robust redirect handling#13445

Merged
abhishekagarwal87 merged 1 commit intoapache:25.0.0from
kfaraz:backport_service_client
Nov 30, 2022
Merged

[Backport] ServiceClient: More robust redirect handling#13445
abhishekagarwal87 merged 1 commit intoapache:25.0.0from
kfaraz:backport_service_client

Conversation

@kfaraz
Copy link
Copy Markdown
Contributor

@kfaraz kfaraz commented Nov 28, 2022

Backports #13413

Detects self-redirects, redirect loops, long redirect chains, and redirects to unknown servers.
Treat all of these cases as an unavailable service, retrying if the retry policy allows it.

Previously, some of these cases would lead to a prompt, unretryable error. This caused
clients contacting an Overlord during a leader change to fail with error messages like:

org.apache.druid.rpc.RpcException: Service [overlord] redirected too many times

Additionally, a slight refactor of callbacks in ServiceClientImpl improves readability of
the flow through onSuccess.
@kfaraz kfaraz added this to the 25.0 milestone Nov 28, 2022
@kfaraz kfaraz requested a review from cryptoe November 30, 2022 05:14
@abhishekagarwal87 abhishekagarwal87 merged commit 13b9dfd into apache:25.0.0 Nov 30, 2022
@kfaraz kfaraz deleted the backport_service_client branch November 30, 2022 11:10
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.

3 participants