[ https://issues.apache.org/jira/browse/HIVE-24786?focusedWorklogId=553592&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-553592 ]
ASF GitHub Bot logged work on HIVE-24786: ----------------------------------------- Author: ASF GitHub Bot Created on: 17/Feb/21 12:58 Start Date: 17/Feb/21 12:58 Worklog Time Spent: 10m Work Description: prasanthj commented on pull request #1983: URL: https://github.com/apache/hive/pull/1983#issuecomment-780539112 @szlta Thanks for the review! I tested the PR on different environment and ran into different set of issues (likely because of OS difference and JDK difference). Encountered a hang issue under some scenarios (socket read timeout). The hang is because there was no timeout defined on the socket created by httpclient and hence it will infinitely wait until server can write something to it (which will never happen because LB disconnected the connection to server). HIVE-12371 provided a way to specify socketTimeout via JDBC param but that was applied only for binary transport and not for http. I made couple of changes to the PR and tested it to make sure the hang never happens 1) For httpmode use the socketTimeout specified by the user via jdbc param 2) The default retry handler does not retry InterruptedIOException. Since SocketTimeoutException (read timeout) is subclass of InterruptedIOException it wasn't retried. So added a custom retry handler with list of classes that will be retried in addition to the default retry (idempotent and unsent requests). Could you please take another look at the PR as it has changed? ---------------------------------------------------------------- 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: 553592) Time Spent: 20m (was: 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 > Labels: pull-request-available > Time Spent: 20m > 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 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. > > Also HIVE-12371 seems to apply the socket timeout only to binary transport. > Same can be passed on to http client as well to avoid retry hang issues with > infinite timeouts. -- This message was sent by Atlassian Jira (v8.3.4#803005)