You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Sergey Shelukhin (JIRA)" <ji...@apache.org> on 2018/04/04 02:36:00 UTC

[jira] [Commented] (HIVE-16850) Converting table to insert-only acid may open a txn in an inappropriate place

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

Sergey Shelukhin commented on HIVE-16850:
-----------------------------------------

I dunno why my patches have so much whitespace lately, probably some eclipse setting got reset :) Will fix w/CR feedback

> Converting table to insert-only acid may open a txn in an inappropriate place
> -----------------------------------------------------------------------------
>
>                 Key: HIVE-16850
>                 URL: https://issues.apache.org/jira/browse/HIVE-16850
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Transactions
>            Reporter: Wei Zheng
>            Assignee: Eugene Koifman
>            Priority: Major
>              Labels: mm-gap-2
>
> This would work for unit-testing, but would need to be fixed for production.
> {noformat}
> HiveTxnManager txnManager = SessionState.get().getTxnMgr();
>       if (txnManager.isTxnOpen()) {
>         mmWriteId = txnManager.getCurrentTxnId();
>       } else {
>         mmWriteId = txnManager.openTxn(new Context(conf), conf.getUser());
>         txnManager.commitTxn();
>       }
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)