[ https://issues.apache.org/jira/browse/HIVE-13249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15281868#comment-15281868 ]
Eugene Koifman commented on HIVE-13249: --------------------------------------- {noformat} public OpenTxnsResponse openTxns(OpenTxnRequest rqst) throws MetaException { 384 if (openTxnsCounter == null) { 385 try { 386 startHouseKeeperService(conf, Class.forName("org.apache.hadoop.hive.ql.txn.AcidOpenTxnsCounterService")); 387 } catch (Exception e) { 388 throw new MetaException(e.getMessage()); 389 } 390 } {noformat} this is not thread safe. concurrent openTxns() can create multiple instances of AcidOpenTxnsCounterService {noformat} public OpenTxnsResponse openTxns(OpenTxnRequest rqst) throws MetaException { 384 if (openTxnsCounter == null) { synchronzied(TxnHandler.class) { 385 try { 386 startHouseKeeperService(conf, Class.forName("org.apache.hadoop.hive.ql.txn.AcidOpenTxnsCounterService")); 387 } catch (Exception e) { 388 throw new MetaException(e.getMessage()); 389 } } 390 } {noformat} would work > Hard upper bound on number of open transactions > ----------------------------------------------- > > Key: HIVE-13249 > URL: https://issues.apache.org/jira/browse/HIVE-13249 > Project: Hive > Issue Type: Improvement > Components: Transactions > Affects Versions: 2.0.0 > Reporter: Wei Zheng > Assignee: Wei Zheng > Attachments: HIVE-13249.1.patch, HIVE-13249.2.patch, > HIVE-13249.3.patch, HIVE-13249.4.patch, HIVE-13249.5.patch, > HIVE-13249.6.patch, HIVE-13249.7.patch, HIVE-13249.8.patch > > > We need to have a safeguard by adding an upper bound for open transactions to > avoid huge number of open-transaction requests, usually due to improper > configuration of clients such as Storm. > Once that limit is reached, clients will start failing. -- This message was sent by Atlassian JIRA (v6.3.4#6332)