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 2021/11/25 01:25:19 UTC

[GitHub] [hudi] xushiyan opened a new pull request #4113: [HUDI-2735] Fix clean rollback archiving logic

xushiyan opened a new pull request #4113:
URL: https://github.com/apache/hudi/pull/4113


   
   
   ## 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] hudi-bot commented on pull request #4113: [HUDI-2735] Fix clean rollback archiving logic

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6c0a7288105e59679b3284d62d7e824716144216",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=3724",
       "triggerID" : "6c0a7288105e59679b3284d62d7e824716144216",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6c0a7288105e59679b3284d62d7e824716144216 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=3724) 
   
   <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 removed a comment on pull request #4113: [HUDI-2735] Fix clean rollback archiving logic

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4113:
URL: https://github.com/apache/hudi/pull/4113#issuecomment-978719620


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6c0a7288105e59679b3284d62d7e824716144216",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "6c0a7288105e59679b3284d62d7e824716144216",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6c0a7288105e59679b3284d62d7e824716144216 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] nsivabalan commented on pull request #4113: [HUDI-2735] Fix clean rollback archiving logic

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


   can we close this out if not an issue. 


-- 
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 change in pull request #4113: [HUDI-2735] Fix clean rollback archiving logic

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on a change in pull request #4113:
URL: https://github.com/apache/hudi/pull/4113#discussion_r756527205



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/HoodieTimelineArchiveLog.java
##########
@@ -140,20 +140,6 @@ public boolean archiveIfRequired(HoodieEngineContext context) throws IOException
     }
   }
 
-  private Stream<HoodieInstant> getCleanInstantsToArchive() {
-    HoodieTimeline cleanAndRollbackTimeline = table.getActiveTimeline()
-        .getTimelineOfActions(CollectionUtils.createSet(HoodieTimeline.CLEAN_ACTION, HoodieTimeline.ROLLBACK_ACTION)).filterCompletedInstants();
-    return cleanAndRollbackTimeline.getInstants()
-        .collect(Collectors.groupingBy(HoodieInstant::getAction)).values().stream()
-        .map(hoodieInstants -> {
-          if (hoodieInstants.size() > this.maxInstantsToKeep) {
-            return hoodieInstants.subList(0, hoodieInstants.size() - this.minInstantsToKeep);
-          } else {
-            return new ArrayList<HoodieInstant>();
-          }
-        }).flatMap(Collection::stream);

Review comment:
       @xushiyan : existing logic looks ok to me in general




-- 
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] xushiyan commented on a change in pull request #4113: [HUDI-2735] Fix clean rollback archiving logic

Posted by GitBox <gi...@apache.org>.
xushiyan commented on a change in pull request #4113:
URL: https://github.com/apache/hudi/pull/4113#discussion_r756531488



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/HoodieTimelineArchiveLog.java
##########
@@ -140,20 +140,6 @@ public boolean archiveIfRequired(HoodieEngineContext context) throws IOException
     }
   }
 
-  private Stream<HoodieInstant> getCleanInstantsToArchive() {
-    HoodieTimeline cleanAndRollbackTimeline = table.getActiveTimeline()
-        .getTimelineOfActions(CollectionUtils.createSet(HoodieTimeline.CLEAN_ACTION, HoodieTimeline.ROLLBACK_ACTION)).filterCompletedInstants();
-    return cleanAndRollbackTimeline.getInstants()
-        .collect(Collectors.groupingBy(HoodieInstant::getAction)).values().stream()
-        .map(hoodieInstants -> {
-          if (hoodieInstants.size() > this.maxInstantsToKeep) {
-            return hoodieInstants.subList(0, hoodieInstants.size() - this.minInstantsToKeep);
-          } else {
-            return new ArrayList<HoodieInstant>();
-          }
-        }).flatMap(Collection::stream);

Review comment:
       > if existing logic checks total rollback instants > config value, then wondering why @yihua was facing the issue w/ kafka connect? Do we know if the rollback was completed or was inflight ?
   
   yes that's a separate issue. Here trying to confirm the business logic we intend to set for archiving. In the other archiving logic for commits/deltacommits, it checks the sum.




-- 
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 change in pull request #4113: [HUDI-2735] Fix clean rollback archiving logic

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on a change in pull request #4113:
URL: https://github.com/apache/hudi/pull/4113#discussion_r756527084



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/HoodieTimelineArchiveLog.java
##########
@@ -140,20 +140,6 @@ public boolean archiveIfRequired(HoodieEngineContext context) throws IOException
     }
   }
 
-  private Stream<HoodieInstant> getCleanInstantsToArchive() {
-    HoodieTimeline cleanAndRollbackTimeline = table.getActiveTimeline()
-        .getTimelineOfActions(CollectionUtils.createSet(HoodieTimeline.CLEAN_ACTION, HoodieTimeline.ROLLBACK_ACTION)).filterCompletedInstants();
-    return cleanAndRollbackTimeline.getInstants()
-        .collect(Collectors.groupingBy(HoodieInstant::getAction)).values().stream()
-        .map(hoodieInstants -> {
-          if (hoodieInstants.size() > this.maxInstantsToKeep) {
-            return hoodieInstants.subList(0, hoodieInstants.size() - this.minInstantsToKeep);
-          } else {
-            return new ArrayList<HoodieInstant>();
-          }
-        }).flatMap(Collection::stream);

Review comment:
       if existing logic checks total rollback instants > config value, then wondering why @yihua was facing the issue w/ kafka connect? Do we know if the rollback was completed or was inflight ?




-- 
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 removed a comment on pull request #4113: [HUDI-2735] Fix clean rollback archiving logic

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4113:
URL: https://github.com/apache/hudi/pull/4113#issuecomment-978720580


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6c0a7288105e59679b3284d62d7e824716144216",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=3724",
       "triggerID" : "6c0a7288105e59679b3284d62d7e824716144216",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6c0a7288105e59679b3284d62d7e824716144216 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=3724) 
   
   <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] xushiyan closed pull request #4113: [HUDI-2735] Fix clean rollback archiving logic

Posted by GitBox <gi...@apache.org>.
xushiyan closed pull request #4113:
URL: https://github.com/apache/hudi/pull/4113


   


-- 
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 #4113: [HUDI-2735] Fix clean rollback archiving logic

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6c0a7288105e59679b3284d62d7e824716144216",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "6c0a7288105e59679b3284d62d7e824716144216",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6c0a7288105e59679b3284d62d7e824716144216 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] xushiyan commented on a change in pull request #4113: [HUDI-2735] Fix clean rollback archiving logic

Posted by GitBox <gi...@apache.org>.
xushiyan commented on a change in pull request #4113:
URL: https://github.com/apache/hudi/pull/4113#discussion_r756511879



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/HoodieTimelineArchiveLog.java
##########
@@ -140,20 +140,6 @@ public boolean archiveIfRequired(HoodieEngineContext context) throws IOException
     }
   }
 
-  private Stream<HoodieInstant> getCleanInstantsToArchive() {
-    HoodieTimeline cleanAndRollbackTimeline = table.getActiveTimeline()
-        .getTimelineOfActions(CollectionUtils.createSet(HoodieTimeline.CLEAN_ACTION, HoodieTimeline.ROLLBACK_ACTION)).filterCompletedInstants();
-    return cleanAndRollbackTimeline.getInstants()
-        .collect(Collectors.groupingBy(HoodieInstant::getAction)).values().stream()
-        .map(hoodieInstants -> {
-          if (hoodieInstants.size() > this.maxInstantsToKeep) {
-            return hoodieInstants.subList(0, hoodieInstants.size() - this.minInstantsToKeep);
-          } else {
-            return new ArrayList<HoodieInstant>();
-          }
-        }).flatMap(Collection::stream);

Review comment:
       @nsivabalan @vinothchandar this checks clean and rollback instants separately against min max thresholds. Is the expected logic to check sum of them?

##########
File path: hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/io/TestHoodieTimelineArchiveLog.java
##########
@@ -356,13 +356,6 @@ public void testArchiveCommitTimeline() throws Exception {
     assertFalse(wrapperFs.exists(markerPath));
   }
 
-  private void verifyInflightInstants(HoodieTableMetaClient metaClient, int expectedTotalInstants) {

Review comment:
       not used




-- 
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 #4113: [HUDI-2735] Fix clean rollback archiving logic

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "6c0a7288105e59679b3284d62d7e824716144216",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=3724",
       "triggerID" : "6c0a7288105e59679b3284d62d7e824716144216",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6c0a7288105e59679b3284d62d7e824716144216 Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=3724) 
   
   <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] nsivabalan commented on pull request #4113: [HUDI-2735] Fix clean rollback archiving logic

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


   @xushiyan : can we close this if not an issue.


-- 
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] xushiyan commented on a change in pull request #4113: [HUDI-2735] Fix clean rollback archiving logic

Posted by GitBox <gi...@apache.org>.
xushiyan commented on a change in pull request #4113:
URL: https://github.com/apache/hudi/pull/4113#discussion_r756531488



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/HoodieTimelineArchiveLog.java
##########
@@ -140,20 +140,6 @@ public boolean archiveIfRequired(HoodieEngineContext context) throws IOException
     }
   }
 
-  private Stream<HoodieInstant> getCleanInstantsToArchive() {
-    HoodieTimeline cleanAndRollbackTimeline = table.getActiveTimeline()
-        .getTimelineOfActions(CollectionUtils.createSet(HoodieTimeline.CLEAN_ACTION, HoodieTimeline.ROLLBACK_ACTION)).filterCompletedInstants();
-    return cleanAndRollbackTimeline.getInstants()
-        .collect(Collectors.groupingBy(HoodieInstant::getAction)).values().stream()
-        .map(hoodieInstants -> {
-          if (hoodieInstants.size() > this.maxInstantsToKeep) {
-            return hoodieInstants.subList(0, hoodieInstants.size() - this.minInstantsToKeep);
-          } else {
-            return new ArrayList<HoodieInstant>();
-          }
-        }).flatMap(Collection::stream);

Review comment:
       > 
   
   yes that's a separate issue. Here trying to confirm the business logic we intend to set for archiving. In the other archiving logic for commits/deltacommits, it checks the sum.




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