[ 
https://issues.apache.org/jira/browse/HIVE-24786?focusedWorklogId=552916&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-552916
 ]

ASF GitHub Bot logged work on HIVE-24786:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Feb/21 12:16
            Start Date: 16/Feb/21 12:16
    Worklog Time Spent: 10m 
      Work Description: prasanthj opened a new pull request #1983:
URL: https://github.com/apache/hive/pull/1983


   ### What changes were proposed in this pull request?
   JDBC http client retries are applied only during initial connection 
establishment and is not applied for broken connection cases (idle timeout 
triggering tcp connection reset). This PR replaces custom retry handler with 
default retry handler with user specified maxRetries (jdbc param). The default 
retry handler retries all exceptions exception (InterruptedIOException, 
UnknownHostException, ConnectException, SSLException) and does not retry 
non-idempotent http methods which is sufficient for handling the broken 
connection cases.
   
   ### Why are the changes needed?
   To make jdbc http client more resilient for socket disconnections by the 
intermediate proxies.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No. maxRetries is already user facing parameter which is reused.
   
   
   ### How was this patch tested?
   Tested in Azure with LB timeout set to default 4 mins for idle timeout and 
nginx reverse proxy (5 min connect, read, write timeout) fronting hiveserver2. 
   1) Connected using beeline and executed a query.
   2) Left beeline untouched for >5 mins.
   3) Watched wireshark for TCP RST 
   4) After TCP RST is received, resubmitted the query beeline
   Without this patch step 4) returned "Broken Pipe" and if the query takes >5 
mins just for execution "Read timeout" is observed. With this patch both were 
not observed.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 552916)
    Remaining Estimate: 0h
            Time Spent: 10m

> JDBC HttpClient should retry for idempotent and unsent http methods
> -------------------------------------------------------------------
>
>                 Key: HIVE-24786
>                 URL: https://issues.apache.org/jira/browse/HIVE-24786
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 4.0.0
>            Reporter: Prasanth Jayachandran
>            Assignee: Prasanth Jayachandran
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When hiveserver2 is behind multiple proxies there is possibility of "broken 
> pipe", "connect timeout" and "read timeout" exceptions if one of the 
> intermediate proxies or load balancers decided to reset the underlying tcp 
> socket after idle timeout. When the connection is broken and when the a query 
> is submitted after idle timeout from beeline (or client) perspective the 
> connection is open but http methods (POST/GET) fails with socket related 
> exceptions. Since these methods are not sent to the server these are safe for 
> client side retries. 



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

Reply via email to