[
https://issues.apache.org/jira/browse/RANGER-5201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Madhan Neethiraj resolved RANGER-5201.
--------------------------------------
Fix Version/s: 3.0.0
2.7.0
Resolution: Fixed
[~takezoe] - thank you for the fix. It is merged in master and ranger-2.7
branches.
- master branch:
https://github.com/apache/ranger/commit/8d20a4458002c2a0675f8e7de4694bedda391fed
- ranger-2.7 branch:
https://github.com/apache/ranger/commit/20882cd40995412a3cf846f2ea077a0ab6123f18
> Retry GET requests on HTTP 5xx errors in RangerRESTClient
> ---------------------------------------------------------
>
> Key: RANGER-5201
> URL: https://issues.apache.org/jira/browse/RANGER-5201
> Project: Ranger
> Issue Type: Improvement
> Components: plugins
> Reporter: Naoki Takezoe
> Assignee: Naoki Takezoe
> Priority: Minor
> Fix For: 3.0.0, 2.7.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> RangerRESTClient has a retry mechanism for connectivity errors that was
> implemented in https://issues.apache.org/jira/browse/RANGER-3565 but it
> doesn't retry HTTP 5xx errors because it works only when
> ClientHandlerException is thrown:
> https://github.com/apache/ranger/blob/dbaad69de10ff7b21b5bd3fc08c4b65b4aa25dff/agents-common/src/main/java/org/apache/ranger/plugin/util/RangerRESTClient.java#L409-L415
> while Jersey's default client handler that is used in RangerRESTClient
> doesn't raise an exception even for 5xx errors:
> https://github.com/javaee/jersey-1.x/blob/1.19.3/jersey-client/src/main/java/com/sun/jersey/client/urlconnection/URLConnectionClientHandler.java
> Therefore, policy retrieval immediately fails without retry when, for
> example, ranger-admin behind a reverse proxy is temporarily unavailable.
> It's better to retry GET requests also on HTTP 5xx errors in RangerRESTClient.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)