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

Zoltán Borók-Nagy updated IMPALA-10422:
---------------------------------------
    Description: 
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.

  was:
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.

*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}
 

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

 

*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.


> 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: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to