You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Aron Hamvas (Jira)" <ji...@apache.org> on 2019/11/11 12:39:00 UTC

[jira] [Commented] (HIVE-22341) abortTxns statements should be executed in a single transaction

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

Aron Hamvas commented on HIVE-22341:
------------------------------------

Is this about the HMS DB operations? Like, setting the txn state to aborted and deleting the records from HIVE_LOCKS based on txnid?

If that is the case, then I am pretty sure HMS is doing that in a single transaction. The logic itself is in the private method 'abortTxns', and there are no guarantees *inside* this method that it is done in a single transaction, but every caller of this method passes an SQL Connection object with auto-commit set to false, and there there is no commit() call in the connection inside the 'abortTxns' method.

 

> abortTxns statements should be executed in a single transaction
> ---------------------------------------------------------------
>
>                 Key: HIVE-22341
>                 URL: https://issues.apache.org/jira/browse/HIVE-22341
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>            Reporter: Jesus Camacho Rodriguez
>            Priority: Major
>
> Logic in `abortTxns` should be executed in a single transaction, rather than multiple ones. Otherwise, if you restart HMS between txn abort and the lock deletion, we end up with orphaned locks.



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