hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alice Fan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-19378) "hive.lock.numretries" Is Misleading
Date Thu, 21 Jun 2018 22:44:00 GMT

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

Alice Fan commented on HIVE-19378:
----------------------------------

Hi [~belugabehr],
I made change for 'hive.lock.numretries' and 'hive.unlock.numretries' at Hive Conf. properties
at the [wiki|https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties] page.
Is there a way to add a highlight or #anchor? Just curious :) 



> "hive.lock.numretries" Is Misleading
> ------------------------------------
>
>                 Key: HIVE-19378
>                 URL: https://issues.apache.org/jira/browse/HIVE-19378
>             Project: Hive
>          Issue Type: Improvement
>          Components: HiveServer2
>    Affects Versions: 3.0.0, 2.4.0
>            Reporter: BELUGA BEHR
>            Assignee: Alice Fan
>            Priority: Minor
>         Attachments: HIVE-19378.1.patch
>
>
> Configuration 'hive.lock.numretries' is confusing.  It's not actually a 'retry' count,
it's the total number of attempt to try:
>  
> {code:java|title=ZooKeeperHiveLockManager.java}
> do {
>       lastException = null;
>       tryNum++;
>       try {
>         if (tryNum > 1) {
>           Thread.sleep(sleepTime);
>           prepareRetry();
>         }
>         ret = lockPrimitive(key, mode, keepAlive, parentCreated, conflictingLocks);
> ...
> } while (tryNum < numRetriesForLock);
> {code}
> So, from this code you can see that on the first loop, {{tryNum}} is set to 1, in which
case, if the configuration num*retries* is set to 1, there will be one attempt total.  With
a *retry* value of 1, I would assume one initial attempt and one additional retry.  Please
change to:
> {code}
> while (tryNum <= numRetriesForLock);
> {code}



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

Mime
View raw message