You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Zoltán Borók-Nagy (Jira)" <ji...@apache.org> on 2020/03/30 10:26:00 UTC

[jira] [Updated] (HIVE-23102) waitForCompactionToFinish can potentially wait for too long

     [ https://issues.apache.org/jira/browse/HIVE-23102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zoltán Borók-Nagy updated HIVE-23102:
-------------------------------------
    Description: 
AlterTableCompactOperation.waitForCompactionToFinish() has the following code fragment:

 
{noformat}
 //double wait time until 5min
 waitTimeMs = waitTimeMs*2;
 waitTimeMs = Math.max(waitTimeMs, waitTimeOut);
{noformat}
Based on the comment ("double wait time until 5min") I think it should use Math.min() instead of Math.max().

It also affects the runtime of Impala tests that use Hive compaction, because they hang for at least 5 mins each time we compact a table. Workaround to this is to configure the wait time to a lower value.

But still, from the comment I think the original intention of the code was to put an upper bound to the wait time, and not a lower bound.

  was:
AlterTableCompactOperation.waitForCompactionToFinish() has the following code fragment:

 
{noformat}
 //double wait time until 5min
 waitTimeMs = waitTimeMs*2;
 waitTimeMs = Math.max(waitTimeMs, waitTimeOut);
{noformat}
Based on the comment ("double wait time until 5min") I think it should use Math.min() instead of Math.max().

It also affects the runtime of Impala tests that use Hive compaction, because they hang for at least 5 mins each time we compact a table.


> waitForCompactionToFinish can potentially wait for too long
> -----------------------------------------------------------
>
>                 Key: HIVE-23102
>                 URL: https://issues.apache.org/jira/browse/HIVE-23102
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Zoltán Borók-Nagy
>            Priority: Major
>
> AlterTableCompactOperation.waitForCompactionToFinish() has the following code fragment:
>  
> {noformat}
>  //double wait time until 5min
>  waitTimeMs = waitTimeMs*2;
>  waitTimeMs = Math.max(waitTimeMs, waitTimeOut);
> {noformat}
> Based on the comment ("double wait time until 5min") I think it should use Math.min() instead of Math.max().
> It also affects the runtime of Impala tests that use Hive compaction, because they hang for at least 5 mins each time we compact a table. Workaround to this is to configure the wait time to a lower value.
> But still, from the comment I think the original intention of the code was to put an upper bound to the wait time, and not a lower bound.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)