hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shelukhin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-17647) DDLTask.generateAddMmTasks(Table tbl) should not start transactions
Date Tue, 10 Oct 2017 00:27:00 GMT

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

Sergey Shelukhin commented on HIVE-17647:
-----------------------------------------

Can be handled after merge. Yes, lock is probably needed...

> DDLTask.generateAddMmTasks(Table tbl) should not start transactions
> -------------------------------------------------------------------
>
>                 Key: HIVE-17647
>                 URL: https://issues.apache.org/jira/browse/HIVE-17647
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Transactions
>            Reporter: Eugene Koifman
>
> This method has 
> {noformat}
>       if (txnManager.isTxnOpen()) {
>         mmWriteId = txnManager.getCurrentTxnId();
>       } else {
>         mmWriteId = txnManager.openTxn(new Context(conf), conf.getUser());
>         txnManager.commitTxn();
>       }
> {noformat}
> this should throw if there is no open transaction.  It should never open one.
> In general the logic seems suspect.  Looks like the intent is to move all existing files
into a delta_x_x/ when a plain table is converted to MM table.  This seems like something
that needs to be done from under an Exclusive lock to prevent concurrent Insert operations
writing data under table/partition root.  But this is too late to acquire locks which should
be done from the Driver.acquireLocks()  (or else have deadlock detector since acquiring them
here would bread all-or-nothing lock acquisition semantics currently required w/o deadlock
detector)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message