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

Alan Gates commented on HIVE-13249:
-----------------------------------

I think the problem with having the thread in TxnHandler instead of 
AcidHousekeeper is that every client will be independently deciding whether the 
system has too many transactions.  This has a couple of problems.  One, it's 
inefficient as every client is running the count query.  But two, it means 
differing configurations could result in some clients seeing the system as 
overloaded and being locked out while others are not.  In fact, a malicious 
client could game the system and set his config high so that he can continue to 
open transactions when other clients cannot.

On the 90% what I'm suggesting is this:
# In the initial state it accepts new transactions until it hits X number total 
transactions open, where X is the configured value
# When it hits X, a full flag is set
# Once the full flag is set no new transactions are allowed in
# The full flag is not unset until the number of open transactions hits X * 0.9.

This is standard procedure with thresholds so that you give the system some 
time to drain off rather than building up a set of clients retrying on opening 
their transactions that all race to get that one available transaction once one 
transaction commits or aborts.

> 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
>
>
> 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)

Reply via email to