[ https://issues.apache.org/jira/browse/RANGER-5201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Naoki Takezoe updated RANGER-5201: ---------------------------------- Summary: Retry GET requests on HTTP 5xx errors in RangerRESTClient (was: Retry GET request on server error in RangerRESTClient) > 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 > Priority: Minor > Time Spent: 10m > 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)