Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-23102

waitForCompactionToFinish can potentially wait for too long

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      AlterTableCompactOperation.waitForCompactionToFinish() has the following code fragment:

       

       //double wait time until 5min
       waitTimeMs = waitTimeMs*2;
       waitTimeMs = Math.max(waitTimeMs, waitTimeOut);
      

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            boroknagyz Zoltán Borók-Nagy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: