You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/07/28 18:52:49 UTC

[GitHub] [hudi] nsivabalan commented on a diff in pull request #6235: [HUDI-4493] Fixing handling of corrupt rollback plans

nsivabalan commented on code in PR #6235:
URL: https://github.com/apache/hudi/pull/6235#discussion_r932570747


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -1120,21 +1120,26 @@ protected Map<String, Option<HoodiePendingRollbackInfo>> getPendingRollbackInfos
       HoodieRollbackPlan rollbackPlan;
       try {
         rollbackPlan = RollbackUtils.getRollbackPlan(metaClient, rollbackInstant);
-      } catch (Exception e) {
-        if (rollbackInstant.isRequested()) {
-          LOG.warn("Fetching rollback plan failed for " + rollbackInstant + ", deleting the plan since it's in REQUESTED state", e);
-          try {
-            metaClient.getActiveTimeline().deletePending(rollbackInstant);
-          } catch (HoodieIOException he) {
-            LOG.warn("Cannot delete " + rollbackInstant, he);
-            continue;
+      } catch (IOException ioe) {
+        if (ioe.getMessage().contains("Not an Avro data file")) {

Review Comment:
   synced w/ Ethan on this. Based on the comment [here](https://github.com/apache/hudi/pull/5245/files#r932532922), its intentional that, if rollback.requested is not accessible for any reason, we will go ahead and regenerate a new rollback plan (and delete the old one). This is the safest option we can think of compared to other alternatives. 
   btw, we do this only incase of rollback.requested and not for rollback.inflight. So, we should be good. 



-- 
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: commits-unsubscribe@hudi.apache.org

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