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

ASF subversion and git services commented on IMPALA-10422:
----------------------------------------------------------

Commit 03af0b2c8c4d7a9db2fbcc63b93bcb0348e4d82f in impala's branch 
refs/heads/master from Zoltan Borok-Nagy
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=03af0b2 ]

IMPALA-10422: EXPLAIN statements leak ACID transactions and locks

Currently EXPLAIN statements might open ACID transactions and
create locks on ACID tables.

This is not necessary since we won't modify the table. But the
real problem is that these transactions and locks are leaked and
open forever. They are even getting heartbeated while the
coordinator is still running.

The solution is to not consume any ACID resources for EXPLAIN
statements.

Testing:
* Added EXPLAIN INSERT OVERWRITE in front of an actual INSERT OVERWRITE
  in an e2e test

Change-Id: I05113b1fd9a3eb2d0dd6cf723df916457f3fbf39
Reviewed-on: http://gerrit.cloudera.org:8080/16923
Reviewed-by: Csaba Ringhofer <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> EXPLAIN statements leak ACID transactions and locks
> ---------------------------------------------------
>
>                 Key: IMPALA-10422
>                 URL: https://issues.apache.org/jira/browse/IMPALA-10422
>             Project: IMPALA
>          Issue Type: Bug
>            Reporter: Zoltán Borók-Nagy
>            Priority: Major
>
> Currently EXPLAIN statements might open ACID transactions and create locks on 
> ACID tables.
> This is not necessary since we won't modify the table. But the real problem 
> is that these transactions and locks are leaked and open forever. They are 
> even getting heartbeated while the coordinator is still running.
> The solution should be to not consume any ACID resources for EXPLAIN 
> statements.
> *Reproduction:*
> {noformat}
> create table test (i int) tblproperties('transactional'='true', 
> 'transactional_properties'='insert_only');
> explain insert overwrite test values (1);
> insert overwrite test values (1);
> ERROR: TransactionException: Failed to acquire lock for transaction 1595
> {noformat}
> *Workarounds when dealing with this issue:*
>  * Restart the impala cluster so the heartbeating stops. After a while the 
> Hive AcidHouseKeeperService should cleanup the resources (abort the 
> transaction and clear the locks)
>  * Manually abort the open transaction via Hive with the ABORT TRANSACTIONS 
> <transaction-id>; command. One can find the transaction id with the help of 
> the SHOW LOCKS and SHOW TRANSACTIONS Hive commands.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to