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

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

                Author: ASF GitHub Bot
            Created on: 07/Mar/22 08:30
            Start Date: 07/Mar/22 08:30
    Worklog Time Spent: 10m 
      Work Description: veghlaci05 commented on a change in pull request #3034:
URL: https://github.com/apache/hive/pull/3034#discussion_r820475442



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Cleaner.java
##########
@@ -288,14 +285,30 @@ private void clean(CompactionInfo ci, long minOpenTxnGLB, 
boolean metricsEnabled
       if (metricsEnabled) {
         
Metrics.getOrCreateCounter(MetricsConstants.COMPACTION_CLEANER_FAILURE_COUNTER).inc();
       }
-      txnHandler.markFailed(ci);
-    } finally {
+      handleCleanerAttemptFailure(ci);
+    }  finally {
       if (metricsEnabled) {
         perfLogger.perfLogEnd(CLASS_NAME, cleanerMetric);
       }
     }
   }
 
+  private void handleCleanerAttemptFailure(CompactionInfo ci) throws 
MetaException {
+    long defaultRetention = getTimeVar(conf, 
HIVE_COMPACTOR_CLEANER_RETRY_RETENTION_TIME, TimeUnit.MILLISECONDS);
+    int cleanAttempts = 0;

Review comment:
       Very good point, I modified the range to 0,10 where 0 means the cleaner 
won't retry at all.




-- 
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: 737426)
    Time Spent: 5.5h  (was: 5h 20m)

> Introduce compaction cleaner failed attempts threshold
> ------------------------------------------------------
>
>                 Key: HIVE-25943
>                 URL: https://issues.apache.org/jira/browse/HIVE-25943
>             Project: Hive
>          Issue Type: Improvement
>          Components: Hive
>            Reporter: László Végh
>            Assignee: László Végh
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 5.5h
>  Remaining Estimate: 0h
>
> If the cleaner fails for some reason, the compaction entity status remains in 
> "ready for cleaning", therefore the cleaner will pick up this entity 
> resulting in an endless try. The number of failed cleaning attempts should be 
> counted and if they reach a certain threshold the cleaner must skip all the 
> cleaning attempts on that compaction entity. 



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

Reply via email to