[ 
https://issues.apache.org/jira/browse/HIVE-25977?focusedWorklogId=746444&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-746444
 ]

ASF GitHub Bot logged work on HIVE-25977:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/Mar/22 09:24
            Start Date: 23/Mar/22 09:24
    Worklog Time Spent: 10m 
      Work Description: deniskuzZ commented on a change in pull request #3102:
URL: https://github.com/apache/hive/pull/3102#discussion_r833034460



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Cleaner.java
##########
@@ -445,10 +445,17 @@ private boolean removeFiles(String location, 
ValidWriteIdList writeIdList, Compa
       obsoleteDirs = dir.getAbortedDirectories();
     }
 
-    if (obsoleteDirs.isEmpty()
-        && !hasDataBelowWatermark(dir, fs, path, ci.highestWriteId, 
writeIdList.getHighWatermark())) {
-      LOG.info(idWatermark(ci) + " nothing to remove below watermark " + 
ci.highestWriteId + ", ");
-      return true;
+    if (obsoleteDirs.isEmpty()) {
+      conf.set(ValidTxnList.VALID_TXNS_KEY, new ValidReadTxnList().toString());
+      
+      AcidDirectory fullDir = AcidUtils.getAcidState(fs, path, conf,
+        new ValidReaderWriteIdList(ci.getFullTableName(), new long[0], new 
BitSet(), ci.highestWriteId, Long.MAX_VALUE),
+        Ref.from(false), false, hdfsDirSnapshots);
+      
+      if (fullDir.getObsolete().isEmpty()) {
+        LOG.info(idWatermark(ci) + " nothing to remove below watermark " + 
ci.highestWriteId + ", ");
+        return true;
+      }

Review comment:
       refactored, please take a look.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 746444)
    Time Spent: 2.5h  (was: 2h 20m)

> Enhance Compaction Cleaner to skip when there is nothing to do #2
> -----------------------------------------------------------------
>
>                 Key: HIVE-25977
>                 URL: https://issues.apache.org/jira/browse/HIVE-25977
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> initially this was just an addendum to the original patch ; but got delayed 
> and altered - so it should have its own ticket



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to