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/05/11 07:48:16 UTC

[GitHub] [hudi] BruceKellan opened a new pull request, #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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

   …ed archiving deletion
   
   ## What is the purpose of the pull request
   
   Suppose a flink application crashes while archiving, it leaves some instant files that should be deleted.
   If the commit file is deleted but the in-flight file is left, when the flink application starts, it will scan and get the last pending instant and throw an exception.
   So we need to delete non-commit file first, and then delete commit file.
   
   ## Verify this pull request
   
   *(Please pick either of the following options)*
   
   This pull request is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This pull request is already covered by existing tests, such as *(please describe tests)*.
   
   (or)
   
   This change added tests and can be verified as follows:
   
   *(example:)*
   
     - *Added integration tests for end-to-end.*
     - *Added HoodieClientWriteTest to verify the change.*
     - *Manually verified the change by running a job locally.*
   
   ## 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] danny0405 commented on a diff in pull request #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java:
##########
@@ -515,13 +515,25 @@ private Stream<HoodieInstant> getInstantsToArchive() {
   private boolean deleteArchivedInstants(List<HoodieInstant> archivedInstants, HoodieEngineContext context) throws IOException {
     LOG.info("Deleting instants " + archivedInstants);
     boolean success = true;
-    List<String> instantFiles = archivedInstants.stream().map(archivedInstant ->
-        new Path(metaClient.getMetaPath(), archivedInstant.getFileName())

Review Comment:
   Yes, the parallel deletion may cause the disorder of the files.
   
   But there is still a confusion needs to be resolved here:
   The archiver only archives the old/completed instant on the timeline, while the flink writer only checks the latest inflight instant which should not be archived yet, so why the flink client is affected here ?
   



-- 
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 #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8571",
       "triggerID" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8571",
       "triggerID" : "1124460339",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "240ae60ebb136c1d61e6273be6dd262b4badace1",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8589",
       "triggerID" : "240ae60ebb136c1d61e6273be6dd262b4badace1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 461c7f000c983a4fff5675f51fefc1cf6d1e31d2 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8571) 
   * 240ae60ebb136c1d61e6273be6dd262b4badace1 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8589) 
   
   <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 #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8571",
       "triggerID" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 461c7f000c983a4fff5675f51fefc1cf6d1e31d2 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8571) 
   
   <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] BruceKellan commented on pull request #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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

   @hudi-bot run azure


-- 
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] danny0405 commented on a diff in pull request #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java:
##########
@@ -515,13 +515,25 @@ private Stream<HoodieInstant> getInstantsToArchive() {
   private boolean deleteArchivedInstants(List<HoodieInstant> archivedInstants, HoodieEngineContext context) throws IOException {
     LOG.info("Deleting instants " + archivedInstants);
     boolean success = true;
-    List<String> instantFiles = archivedInstants.stream().map(archivedInstant ->
-        new Path(metaClient.getMetaPath(), archivedInstant.getFileName())

Review Comment:
   The `archivedInstants` seems already been sorted, because the instants from the timeline are already sorted by the instant timestamp and **state**, while in 
   https://github.com/apache/hudi/blob/b10ca7e69f43cf2f14b09d0a610102ab058b1511/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java#L465
   
   we group by the instant pairs but it should still keep sequence for single instant,
   one instant would be sorted by state: requested -> inflight -> complete,
   so in theory, the files are also cleaned in this sequence.
   



-- 
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 #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8571",
       "triggerID" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "1124460339",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 461c7f000c983a4fff5675f51fefc1cf6d1e31d2 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8571) 
   
   <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] BruceKellan commented on a diff in pull request #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java:
##########
@@ -515,13 +515,25 @@ private Stream<HoodieInstant> getInstantsToArchive() {
   private boolean deleteArchivedInstants(List<HoodieInstant> archivedInstants, HoodieEngineContext context) throws IOException {
     LOG.info("Deleting instants " + archivedInstants);
     boolean success = true;
-    List<String> instantFiles = archivedInstants.stream().map(archivedInstant ->
-        new Path(metaClient.getMetaPath(), archivedInstant.getFileName())

Review Comment:
   I had this happen last time. 
   Flink Application's JobManager was force killed because of memory. 
   Ant it left some instant file:
   
   * 20220513170152006.commit.requested
   * 20220513170152006.inflight
   * 20220513170202566.commit
   * 20220513170202566.commit.requested
   * 20220513170202566.inflight
   
   In this case, flink Application will execute this code:
   
   https://github.com/apache/hudi/blob/7fb436d3cf66748f32776cf3db2d943f97b52160/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/meta/CkpMetadata.java#L97-L102
   
   It will scan and get last pending instant, and create a in-flight file in `.hoodie/.aux/ckp_meta`(`20220513170152006` in this case).
   
   The final result will throw an excpetion: `Found commits after time :20220513170152006, please rollback greater commits first`
   
   https://github.com/apache/hudi/blob/7fb436d3cf66748f32776cf3db2d943f97b52160/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/rollback/BaseRollbackActionExecutor.java#L179-L183



-- 
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] BruceKellan commented on a diff in pull request #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java:
##########
@@ -515,13 +515,25 @@ private Stream<HoodieInstant> getInstantsToArchive() {
   private boolean deleteArchivedInstants(List<HoodieInstant> archivedInstants, HoodieEngineContext context) throws IOException {
     LOG.info("Deleting instants " + archivedInstants);
     boolean success = true;
-    List<String> instantFiles = archivedInstants.stream().map(archivedInstant ->
-        new Path(metaClient.getMetaPath(), archivedInstant.getFileName())

Review Comment:
   I had this happen last time. Flink Application's JobManager was force killed because of memory. 
   Ant it left some instant file:
   
   * 20220513170152006.commit.requested
   * 20220513170152006.inflight
   * 20220513170202566.commit
   * 20220513170202566.commit.requested
   * 20220513170202566.inflight
   
   In this case, flink Application will execute this code:
   
   https://github.com/apache/hudi/blob/7fb436d3cf66748f32776cf3db2d943f97b52160/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/meta/CkpMetadata.java#L97-L102
   
   It will scan and get last pending instant, and create a in-flight file in `.hoodie/.aux/ckp_meta`(`20220513170152006` in this case).
   
   The final result will throw an excpetion:
   ```
   Caused by: org.apache.hudi.exception.HoodieRollbackException: Found commits after time :20220513170152006, please rollback greater commits first
   ```
   
   https://github.com/apache/hudi/blob/7fb436d3cf66748f32776cf3db2d943f97b52160/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/rollback/BaseRollbackActionExecutor.java#L179-L183



-- 
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 #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8571",
       "triggerID" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8571",
       "triggerID" : "1124460339",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 461c7f000c983a4fff5675f51fefc1cf6d1e31d2 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8571) 
   
   <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] danny0405 commented on a diff in pull request #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java:
##########
@@ -515,13 +515,25 @@ private Stream<HoodieInstant> getInstantsToArchive() {
   private boolean deleteArchivedInstants(List<HoodieInstant> archivedInstants, HoodieEngineContext context) throws IOException {
     LOG.info("Deleting instants " + archivedInstants);
     boolean success = true;
-    List<String> instantFiles = archivedInstants.stream().map(archivedInstant ->
-        new Path(metaClient.getMetaPath(), archivedInstant.getFileName())

Review Comment:
   Cool, the logic to fetch the pending instant is problematic, but the error trace you paste is mainly because when collecting the instants to rollback in line:
   
   https://github.com/apache/hudi/blob/7fb436d3cf66748f32776cf3db2d943f97b52160/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java#L1084
   
   We do not consider that there are inflight instants (previously completed but inflight again because of the archiving) on the timeline, cc @nsivabalan :)



-- 
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 #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 461c7f000c983a4fff5675f51fefc1cf6d1e31d2 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] BruceKellan closed pull request #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

Posted by GitBox <gi...@apache.org>.
BruceKellan closed pull request #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…
URL: https://github.com/apache/hudi/pull/5556


-- 
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] danny0405 commented on pull request #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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

   Close because HUDI-4145 already resolved it.


-- 
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 #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8571",
       "triggerID" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8571",
       "triggerID" : "1124460339",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "240ae60ebb136c1d61e6273be6dd262b4badace1",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "240ae60ebb136c1d61e6273be6dd262b4badace1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 461c7f000c983a4fff5675f51fefc1cf6d1e31d2 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8571) 
   * 240ae60ebb136c1d61e6273be6dd262b4badace1 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 #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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

   @danny0405 : please rope in anyone who could assist in reviewing. for now, assigned the PR to you.


-- 
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] danny0405 commented on a diff in pull request #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java:
##########
@@ -515,13 +515,25 @@ private Stream<HoodieInstant> getInstantsToArchive() {
   private boolean deleteArchivedInstants(List<HoodieInstant> archivedInstants, HoodieEngineContext context) throws IOException {
     LOG.info("Deleting instants " + archivedInstants);
     boolean success = true;
-    List<String> instantFiles = archivedInstants.stream().map(archivedInstant ->
-        new Path(metaClient.getMetaPath(), archivedInstant.getFileName())

Review Comment:
   I have a patch to fix the pending instant time fetch but it does not solve your problem :)
   [fix.patch.zip](https://github.com/apache/hudi/files/8686763/fix.patch.zip)
   
   



-- 
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] BruceKellan commented on pull request #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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

   I will close this pr because other prs have solved similar problems.
   Related to [HUDI-4145](https://github.com/apache/hudi/pull/5676).


-- 
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] BruceKellan commented on a diff in pull request #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java:
##########
@@ -515,13 +515,25 @@ private Stream<HoodieInstant> getInstantsToArchive() {
   private boolean deleteArchivedInstants(List<HoodieInstant> archivedInstants, HoodieEngineContext context) throws IOException {
     LOG.info("Deleting instants " + archivedInstants);
     boolean success = true;
-    List<String> instantFiles = archivedInstants.stream().map(archivedInstant ->
-        new Path(metaClient.getMetaPath(), archivedInstant.getFileName())

Review Comment:
   Yes, that's right. But I'm not sure if `deleteFilesParallelize` is cleaned in order. It use `FSUtils.parallelizeFilesProcess` to delete file and depend on implement in different engine.
   
   https://github.com/apache/hudi/blob/b10ca7e69f43cf2f14b09d0a610102ab058b1511/hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/common/HoodieFlinkEngineContext.java#L145-L147
   
   For example, in flink engine context, it use parallel stream to delete file. 
   This is my understanding, please ping me if I am wrong.



-- 
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] BruceKellan commented on a diff in pull request #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java:
##########
@@ -515,13 +515,25 @@ private Stream<HoodieInstant> getInstantsToArchive() {
   private boolean deleteArchivedInstants(List<HoodieInstant> archivedInstants, HoodieEngineContext context) throws IOException {
     LOG.info("Deleting instants " + archivedInstants);
     boolean success = true;
-    List<String> instantFiles = archivedInstants.stream().map(archivedInstant ->
-        new Path(metaClient.getMetaPath(), archivedInstant.getFileName())

Review Comment:
   @nsivabalan :)



-- 
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] BruceKellan commented on pull request #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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

   @hudi-bot run azure


-- 
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] BruceKellan commented on a diff in pull request #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java:
##########
@@ -515,13 +515,25 @@ private Stream<HoodieInstant> getInstantsToArchive() {
   private boolean deleteArchivedInstants(List<HoodieInstant> archivedInstants, HoodieEngineContext context) throws IOException {
     LOG.info("Deleting instants " + archivedInstants);
     boolean success = true;
-    List<String> instantFiles = archivedInstants.stream().map(archivedInstant ->
-        new Path(metaClient.getMetaPath(), archivedInstant.getFileName())

Review Comment:
   I had this happen last time. 
   Flink Application's JobManager was force killed because of memory. 
   Ant it left some instant file:
   
   * 20220513170152006.commit.requested
   * 20220513170152006.inflight
   * 20220513170202566.commit
   * 20220513170202566.commit.requested
   * 20220513170202566.inflight
   
   In this case, flink Application will execute this code:
   
   https://github.com/apache/hudi/blob/7fb436d3cf66748f32776cf3db2d943f97b52160/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/meta/CkpMetadata.java#L97-L102
   
   It will scan and get last pending instant, and create a in-flight file in `.hoodie/.aux/ckp_meta`(`20220513170152006` in this case).
   
   The final result will throw an excpetion:
   ```
   Caused by: org.apache.hudi.exception.HoodieRollbackException: Found commits after time :20220513170152006, please rollback greater commits first
   ```
   
   https://github.com/apache/hudi/blob/7fb436d3cf66748f32776cf3db2d943f97b52160/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/rollback/BaseRollbackActionExecutor.java#L179-L183



-- 
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 #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8571",
       "triggerID" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 461c7f000c983a4fff5675f51fefc1cf6d1e31d2 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8571) 
   
   <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 #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8571",
       "triggerID" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "461c7f000c983a4fff5675f51fefc1cf6d1e31d2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8571",
       "triggerID" : "1124460339",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "240ae60ebb136c1d61e6273be6dd262b4badace1",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8589",
       "triggerID" : "240ae60ebb136c1d61e6273be6dd262b4badace1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 240ae60ebb136c1d61e6273be6dd262b4badace1 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8589) 
   
   <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