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

Eugene Koifman commented on HIVE-8258:
--------------------------------------

getAcidState() has
{noformat}
    if (bestBase != null) {
      // remove the entries so we don't get confused later and think we should
      // use them.
      original.clear();
    } else {
      // Okay, we're going to need these originals.  Recurse through them and 
figure out what we
      // really need.
      for (FileStatus origDir : originalDirectories) {
        findOriginals(fs, origDir, original);
      }
    }
{noformat}

The 'if' part doesn't do anything useful.  
Also, I think the logic for why this changes addresses the race condition is 
very subtle, so a more detailed comment would be useful.

Otherwise, +1.

> Compactor cleaners can be starved on a busy table or partition.
> ---------------------------------------------------------------
>
>                 Key: HIVE-8258
>                 URL: https://issues.apache.org/jira/browse/HIVE-8258
>             Project: Hive
>          Issue Type: Bug
>          Components: Transactions
>    Affects Versions: 0.13.1
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Critical
>             Fix For: 0.14.0
>
>         Attachments: HIVE-8258.2.patch, HIVE-8258.3.patch, HIVE-8258.4.patch, 
> HIVE-8258.5.patch, HIVE-8258.6.patch, HIVE-8258.patch
>
>
> Currently the cleaning thread in the compactor does not run on a table or 
> partition while any locks are held on this partition.  This leaves it open to 
> starvation in the case of a busy table or partition.  It only needs to wait 
> until all locks on the table/partition at the time of the compaction have 
> expired.  Any jobs initiated after that (and thus any locks obtained) will be 
> for the new versions of the files.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to