hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chaoyu Tang (JIRA)" <>
Subject [jira] [Updated] (HIVE-14799) Query operation are not thread safe during its cancellation
Date Sun, 09 Oct 2016 21:27:20 GMT


Chaoyu Tang updated HIVE-14799:
    Attachment: HIVE-14799.3.patch

Revised the patch and use the model [~sershe] suggestged. The close operation will defer the
resource releases to the query process if the driver is running (compiling/executing) the
query. The resources get released once the query is finished (or interrupted). Otherwise the
close releases the driver resource by itself. So there will be no waiting for the close (or
cancel) operation. [~sershe] Could you review it? I have also uploaded the new patch to RB

> Query operation are not thread safe during its cancellation
> -----------------------------------------------------------
>                 Key: HIVE-14799
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>            Reporter: Chaoyu Tang
>            Assignee: Chaoyu Tang
>         Attachments: HIVE-14799.1.patch, HIVE-14799.2.patch, HIVE-14799.3.patch, HIVE-14799.patch
> When a query is cancelled either via Beeline (Ctrl-C) or API call TCLIService.Client.CancelOperation,
SQLOperation.cancel is invoked in a different thread from that running the query to close/destroy
its encapsulated Driver object. Both SQLOperation and Driver are not thread-safe which could
sometimes result in Runtime exceptions like NPE. The errors from the running query are not
handled properly therefore probably causing some stuffs (files, locks etc) not being cleaned
after the query termination.

This message was sent by Atlassian JIRA

View raw message