[
https://issues.apache.org/jira/browse/HIVE-16850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergey Shelukhin updated HIVE-16850:
------------------------------------
Description:
{noformat}
HiveTxnManager txnManager = SessionState.get().getTxnMgr();
if (txnManager.isTxnOpen()) {
mmWriteId = txnManager.getCurrentTxnId();
} else {
mmWriteId = txnManager.openTxn(new Context(conf), conf.getUser());
txnManager.commitTxn();
}
{noformat}
> Only open a new transaction when there's no currently opened transaction
> ------------------------------------------------------------------------
>
> 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
> Labels: mm-gap-2
> Fix For: hive-14535
>
>
> {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
(v6.4.14#64029)