[ 
https://issues.apache.org/jira/browse/HIVE-5268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thiruvel Thirumoolan updated HIVE-5268:
---------------------------------------

    Attachment: HIVE-5268_prototype.patch

Attaching a preliminary patch for branch 12. As mentioned before, this patch is 
aggressive (was a start) in cleaning up resources on server side. As soon as a 
client disconnects the resources are cleaned up on HS2 (if a query is running 
during disconnection, the resources are cleaned up at the end of the query). 
This approach was designed for Hive10 and I am working on porting it to trunk 
and a patch will be available for Hive12 too. The newer approach will handle 
disconnects during async query execution and also have timeouts after which 
handles/sessions will be cleaned up instead of the existing aggressive approach.

Vaibhav, can I assign this to myself if you arent working on this? Thanks!

> HiveServer2 accumulates orphaned OperationHandle objects when a client fails 
> while executing query
> --------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-5268
>                 URL: https://issues.apache.org/jira/browse/HIVE-5268
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>            Reporter: Vaibhav Gumashta
>            Assignee: Vaibhav Gumashta
>             Fix For: 0.13.0
>
>         Attachments: HIVE-5268_prototype.patch
>
>
> When queries are executed against the HiveServer2 an OperationHandle object 
> is stored in the OperationManager.handleToOperation HashMap. Currently its 
> the duty of the JDBC client to explicitly close to cleanup the entry in the 
> map. But if the client fails to close the statement then the OperationHandle 
> object is never cleaned up and gets accumulated in the server.
> This can potentially cause OOM on the server over time. This also can be used 
> as a loophole by a malicious client to bring down the Hive server.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to