You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Larry McCay (Jira)" <ji...@apache.org> on 2021/10/09 17:49:00 UTC

[jira] [Commented] (KNOX-1439) HA Dispatch implementations should differentiate IOExceptions

    [ https://issues.apache.org/jira/browse/KNOX-1439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17426656#comment-17426656 ] 

Larry McCay commented on KNOX-1439:
-----------------------------------

Due to upcoming release of 1.6.0 and the need for an incompatible change coming up for log4j migration, we are moving this out to the 2.0.0 release. As of now, 1.6.0 will be the last 1.x.x release due to the incompatible change. If there is a critical need for this in 1.6.0 please feel free to move the fixVersion back to 1.6.0 with a note of justification.

> HA Dispatch implementations should differentiate IOExceptions
> -------------------------------------------------------------
>
>                 Key: KNOX-1439
>                 URL: https://issues.apache.org/jira/browse/KNOX-1439
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 1.1.0
>            Reporter: Philip Zampino
>            Priority: Major
>             Fix For: 2.0.0
>
>
> The HA Dispatch implementations catch IOException, and initiate failover logic regardless of the type of error the exception represents. For instance, some IOExceptions indicate interrupted data transfer while others represent connection errors.
> This distinction is especially important for PUT and POST requests, for which InputStreamEntity is used for the content. InputStreamEntity is a non-repeatable entity type, making the results of subsequent attempts unreliable.
> We should probably only failover / retry on connection-related IOException types:
>  * java.net.SocketException
>  * java.net.UnknownHostException
> And return an error response to the client for other IOException types. Maybe it makes sense to consider the HTTP method to make this decision (e.g., retry GET requests, but not PUT or POST).
> The affected dispatch implementations includes at least:
>  * org.apache.knox.gateway.ha.dispatch.DefaultHaDispatch
>  * org.apache.knox.gateway.ha.dispatch.AtlasApiHaDispatch
>  * org.apache.knox.gateway.ha.dispatch.AtlasHaDispatch
>  * org.apache.knox.gateway.dispatch.NiFiHaDispatch
>  * org.apache.knox.gateway.hdfs.dispatch.AbstractHdfsHaDispatch
>  
> If retry is configured, but we won't retry, then perhaps java.net.HttpRetryException should be thrown.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)