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 12:23:24 UTC

[GitHub] [hudi] nsivabalan opened a new pull request, #6235: [HUDI-4493] Fixing handling of corrupt rollback plans

nsivabalan opened a new pull request, #6235:
URL: https://github.com/apache/hudi/pull/6235

   ## What is the purpose of the pull request
   
   - When corrupt rollback plans were handled, we missed to catch only the exact scenario, but it includes few other unrelated scenarios as well. Fixing the same in this patch to only catch for the required exception and for a particular msg in stacktrace. 
   
   ## Brief change log
   
   - Fixed right way to handle corruption of rollback plans. 
   
   ## Verify this pull request
   
   This pull request is already covered by existing tests, such as TestClientRollback.testRollbackWithRequestedRollbackPlan
   
   ## Committer checklist
   
    - [ ] Has a corresponding JIRA in PR title & commit
    
    - [ ] Commit message is descriptive of the change
    
    - [ ] CI is green
   
    - [ ] Necessary doc changes done or have another open PR
          
    - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
   


-- 
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


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

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on PR #6235:
URL: https://github.com/apache/hudi/pull/6235#issuecomment-1198516580

   closing the PR based on discussion above 


-- 
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


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

Posted by GitBox <gi...@apache.org>.
codope commented on code in PR #6235:
URL: https://github.com/apache/hudi/pull/6235#discussion_r932238047


##########
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:
   Relying on an exception message can be problematic as it can change across versions. Is there another way? Might not be.



-- 
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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on PR #6235:
URL: https://github.com/apache/hudi/pull/6235#issuecomment-1198108423

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "57d30375ebb5a52aa81e2d7e52040c0c25b0757e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10426",
       "triggerID" : "57d30375ebb5a52aa81e2d7e52040c0c25b0757e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 57d30375ebb5a52aa81e2d7e52040c0c25b0757e Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10426) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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


[GitHub] [hudi] codope closed pull request #6235: [HUDI-4493] Fixing handling of corrupt rollback plans

Posted by GitBox <gi...@apache.org>.
codope closed pull request #6235: [HUDI-4493] Fixing handling of corrupt rollback plans
URL: https://github.com/apache/hudi/pull/6235


-- 
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


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

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on PR #6235:
URL: https://github.com/apache/hudi/pull/6235#issuecomment-1198103482

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "57d30375ebb5a52aa81e2d7e52040c0c25b0757e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "57d30375ebb5a52aa81e2d7e52040c0c25b0757e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 57d30375ebb5a52aa81e2d7e52040c0c25b0757e UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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


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

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on PR #6235:
URL: https://github.com/apache/hudi/pull/6235#issuecomment-1198282901

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "57d30375ebb5a52aa81e2d7e52040c0c25b0757e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10426",
       "triggerID" : "57d30375ebb5a52aa81e2d7e52040c0c25b0757e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 57d30375ebb5a52aa81e2d7e52040c0c25b0757e Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10426) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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


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

Posted by GitBox <gi...@apache.org>.
yihua commented on code in PR #6235:
URL: https://github.com/apache/hudi/pull/6235#discussion_r932534664


##########
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:
   Check my comment here: https://github.com/apache/hudi/pull/5245/files#r932532922.  I don't think we should merge this change.



-- 
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