Hi Madhan,

On Thu, Apr 3, 2025 at 2:53 PM Madhan Neethiraj <mad...@apache.org> wrote:
>
> Hi Naoki Takezoe,
>
> > - retry a request for server errors (5xx) to cover temporary server issues
> In case of policy download failures, Ranger plugin does retry 3 times, with a 
> pause of 1 sec between attempts. Please see below relevant logs from Trino. 
> If such logs are not seen in your environment, can you share the logs to 
> investigate this further?

Note that our ranger-admin is behind a reverse proxy and the reverse
proxy itself was alive.

Again, I know RangerRESTClient has a retry mechanism
(https://issues.apache.org/jira/browse/RANGER-3565) but it works only
when ClientHandlerException occurs:
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

> > - fail policy evaluation with initialization error if the policy has never 
> > been successfully retrieved
> Given there are no policies available, plugin should return "access denied". 
> How different is this from returning initialization error?

Initialization error would be worth retrying on the Trino client side
even if it's not covered on the Ranger client side.

-- 
Naoki Takezoe

Reply via email to