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/02/14 08:26:45 UTC

[GitHub] [hudi] zhangyue19921010 opened a new pull request #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView

zhangyue19921010 opened a new pull request #4810:
URL: https://github.com/apache/hudi/pull/4810


   https://issues.apache.org/jira/browse/HUDI-3421
   ## What is the purpose of the pull request
   If there is a inflight clustering instant at the earliest of active time line, AbstractTableFileSystemView#getxxBaseFIle() will be broken because of un-committed data file created by this clustering job.
   
   Steps to re produce this problem (set archive min =2, max =3 and disable clean)
   1. do ingestion with commit 1
   2. trigger a clustering job with replacecommit 2
   3. do another ingestion until commit 1 is archived ---> for now commit2 is the earliest instant at active timeline. Also we could delete commit 1 directly 
   4. compare the count(*) query result with/without replacecommit 2
   
   We could find the result without replacecommit 2 is bigger than with it.
   
   This patch is try to fix it and **We couldn't take uncommitted data file created by inflight clustering as a `HoodieBaseFile`**
   ## Brief change log
   
   *(for example:)*
     - *Modify AnnotationLocation checkstyle rule in checkstyle.xml*
   
   ## 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] hudi-bot removed a comment on pull request #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991",
       "triggerID" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5993",
       "triggerID" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c9de44f309ad09ef92f3cd212262d18302422978 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5993) 
   
   <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] zhangyue19921010 commented on pull request #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   Hi @codope and @satishkotha Sorry to bother you. Would you mind to take a look at his patch?
   Thanks a lot :)


-- 
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] zhangyue19921010 commented on a change in pull request #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java
##########
@@ -380,6 +380,19 @@ protected boolean isBaseFileDueToPendingCompaction(HoodieBaseFile baseFile) {
         && baseFile.getCommitTime().equals(compactionWithInstantTime.get().getKey());
   }
 
+  /**
+   * With async clustering, it is possible to see partial/complete base-files due to inflight-clustering, Ignore those
+   * base-files.
+   *
+   * @param baseFile base File
+   */
+  protected boolean isBaseFileDueToPendingClustering(HoodieBaseFile baseFile) {
+    List<String> pendingReplaceInstants =
+        metaClient.getActiveTimeline().filterPendingReplaceTimeline().getInstants().map(HoodieInstant::getTimestamp).collect(Collectors.toList());

Review comment:
       Emmm, maybe we can't use `fgIdToPendingClustering` to do filter here.
   Because the files recorded in `fgIdToPendingClustering` are committed file and need to be seen.
   What we need to filter here are the in-flight uncommitted data files produced by clustering job.
   
   So that we need to know the instant time of `xxxx.replacecommit.requested` or `xxxx.replacecommit.inflight` and use it to filter out uncommitted clustering data files.




-- 
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] zhangyue19921010 commented on a change in pull request #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java
##########
@@ -492,7 +505,7 @@ protected HoodieBaseFile addBootstrapBaseFileIfPresent(HoodieFileGroupId fileGro
           .map(fileGroup -> Option.fromJavaOptional(fileGroup.getAllBaseFiles()
               .filter(baseFile -> HoodieTimeline.compareTimestamps(baseFile.getCommitTime(), HoodieTimeline.LESSER_THAN_OR_EQUALS, maxCommitTime
               ))
-              .filter(df -> !isBaseFileDueToPendingCompaction(df)).findFirst()))
+              .filter(df -> !isBaseFileDueToPendingCompaction(df) && !isBaseFileDueToPendingClustering(df)).findFirst()))

Review comment:
       When inflight clustering at the earliest instant of the active timeline, this bug could happen(based on follow code). So that no matter what  maxCommitTime is, we can' t filter it out.
   Now we use take containsOrBeforeTimelineStarts as committed, which may involve unfinished clustering data(this inflight clustering instant is at the earliest of active timeline.)
   https://github.com/apache/hudi/blob/55ecbc662e30068ce0ed49166d254202bd598a8c/hudi-common/src/main/java/org/apache/hudi/common/model/HoodieFileGroup.java#L120
   
   
   




-- 
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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991",
       "triggerID" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7af5cab11b0de6be344b06affad7cdff4285405d Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991) 
   * c9de44f309ad09ef92f3cd212262d18302422978 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 removed a comment on pull request #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991",
       "triggerID" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7af5cab11b0de6be344b06affad7cdff4285405d Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991) 
   * c9de44f309ad09ef92f3cd212262d18302422978 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] codope merged pull request #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

Posted by GitBox <gi...@apache.org>.
codope merged pull request #4810:
URL: https://github.com/apache/hudi/pull/4810


   


-- 
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 change in pull request #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java
##########
@@ -492,7 +505,7 @@ protected HoodieBaseFile addBootstrapBaseFileIfPresent(HoodieFileGroupId fileGro
           .map(fileGroup -> Option.fromJavaOptional(fileGroup.getAllBaseFiles()
               .filter(baseFile -> HoodieTimeline.compareTimestamps(baseFile.getCommitTime(), HoodieTimeline.LESSER_THAN_OR_EQUALS, maxCommitTime
               ))
-              .filter(df -> !isBaseFileDueToPendingCompaction(df)).findFirst()))
+              .filter(df -> !isBaseFileDueToPendingCompaction(df) && !isBaseFileDueToPendingClustering(df)).findFirst()))

Review comment:
       Shouldn't the caller pass in the right `maxCommitTime` to filter out the pending base files ?




-- 
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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991",
       "triggerID" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5993",
       "triggerID" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e7f2297be7ee21f54a2600433537d3fcb83f3f7b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "e7f2297be7ee21f54a2600433537d3fcb83f3f7b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c9de44f309ad09ef92f3cd212262d18302422978 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5993) 
   * e7f2297be7ee21f54a2600433537d3fcb83f3f7b 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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   @codope : can we close the loop here please. If you want me to take it up, let me know. happy to do. 


-- 
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] zhangyue19921010 commented on a change in pull request #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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



##########
File path: hudi-common/src/test/java/org/apache/hudi/common/table/view/TestHoodieTableFileSystemView.java
##########
@@ -1537,6 +1542,234 @@ public void testPendingClusteringOperations() throws IOException {
     assertFalse(fileIds.contains(fileId3));
   }
 
+  /**
+   *
+   * create hoodie table like
+   * .
+   * ├── .hoodie
+   * │   ├── .aux
+   * │   │   └── .bootstrap
+   * │   │       ├── .fileids
+   * │   │       └── .partitions
+   * │   ├── .temp
+   * │   ├── 1.commit
+   * │   ├── 1.commit.requested
+   * │   ├── 1.inflight
+   * │   ├── 2.replacecommit
+   * │   ├── 2.replacecommit.inflight
+   * │   ├── 2.replacecommit.requested
+   * │   ├── 3.commit
+   * │   ├── 3.commit.requested
+   * │   ├── 3.inflight
+   * │   ├── archived
+   * │   └── hoodie.properties
+   * └── 2020
+   *     └── 06
+   *         └── 27
+   *             ├── 5fe477d2-0150-46d4-833c-1e9cc8da9948_1-0-1_3.parquet
+   *             ├── 7e3208c8-fdec-4254-9682-8fff1e51ee8d_1-0-1_2.parquet
+   *             ├── e04b0e2d-1467-46b2-8ea6-f4fe950965a5_1-0-1_1.parquet
+   *             └── f3936b66-b3db-4fc8-a6d0-b1a7559016e6_1-0-1_1.parquet
+   *
+   * First test fsView API with finished clustering:
+   *  1. getLatestBaseFilesBeforeOrOn
+   *  2. getBaseFileOn
+   *  3. getLatestBaseFilesInRange
+   *  4. getAllBaseFiles
+   *  5. getLatestBaseFiles

Review comment:
       Yep, there is pretty much getxxxxLatestxxx() methods, hhh.
   The root change here is that add `isBaseFileDueToPendingClustering` the same as `isBaseFileDueToPendingCompaction` so add this check to wherever `isBaseFileDueToPendingCompaction` is.
   
   And this APIs in UT are all affected APIs.




-- 
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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82787b8461a0447467508cf2c7750870e57a8e8a 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 removed a comment on pull request #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991",
       "triggerID" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5993",
       "triggerID" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e7f2297be7ee21f54a2600433537d3fcb83f3f7b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6009",
       "triggerID" : "e7f2297be7ee21f54a2600433537d3fcb83f3f7b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c9de44f309ad09ef92f3cd212262d18302422978 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5993) 
   * e7f2297be7ee21f54a2600433537d3fcb83f3f7b Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6009) 
   
   <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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991",
       "triggerID" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5993",
       "triggerID" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e7f2297be7ee21f54a2600433537d3fcb83f3f7b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6009",
       "triggerID" : "e7f2297be7ee21f54a2600433537d3fcb83f3f7b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e7f2297be7ee21f54a2600433537d3fcb83f3f7b Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6009) 
   
   <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 commented on a change in pull request #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java
##########
@@ -380,6 +380,19 @@ protected boolean isBaseFileDueToPendingCompaction(HoodieBaseFile baseFile) {
         && baseFile.getCommitTime().equals(compactionWithInstantTime.get().getKey());
   }
 
+  /**
+   * With async clustering, it is possible to see partial/complete base-files due to inflight-clustering, Ignore those
+   * base-files.
+   *
+   * @param baseFile base File
+   */
+  protected boolean isBaseFileDueToPendingClustering(HoodieBaseFile baseFile) {
+    List<String> pendingReplaceInstants =
+        metaClient.getActiveTimeline().filterPendingReplaceTimeline().getInstants().map(HoodieInstant::getTimestamp).collect(Collectors.toList());

Review comment:
       Can we not reuse `isPendingClusteringScheduledForFileId()` or `getPendingClusteringInstant()`? So, we maintain a map of `fgIdToPendingClustering` which supports various methods. If we can reuse one of them then we need to call active timeline.

##########
File path: hudi-common/src/test/java/org/apache/hudi/common/table/view/TestHoodieTableFileSystemView.java
##########
@@ -1537,6 +1542,234 @@ public void testPendingClusteringOperations() throws IOException {
     assertFalse(fileIds.contains(fileId3));
   }
 
+  /**
+   *
+   * create hoodie table like
+   * .
+   * ├── .hoodie
+   * │   ├── .aux
+   * │   │   └── .bootstrap
+   * │   │       ├── .fileids
+   * │   │       └── .partitions
+   * │   ├── .temp
+   * │   ├── 1.commit
+   * │   ├── 1.commit.requested
+   * │   ├── 1.inflight
+   * │   ├── 2.replacecommit
+   * │   ├── 2.replacecommit.inflight
+   * │   ├── 2.replacecommit.requested
+   * │   ├── 3.commit
+   * │   ├── 3.commit.requested
+   * │   ├── 3.inflight
+   * │   ├── archived
+   * │   └── hoodie.properties
+   * └── 2020
+   *     └── 06
+   *         └── 27
+   *             ├── 5fe477d2-0150-46d4-833c-1e9cc8da9948_1-0-1_3.parquet
+   *             ├── 7e3208c8-fdec-4254-9682-8fff1e51ee8d_1-0-1_2.parquet
+   *             ├── e04b0e2d-1467-46b2-8ea6-f4fe950965a5_1-0-1_1.parquet
+   *             └── f3936b66-b3db-4fc8-a6d0-b1a7559016e6_1-0-1_1.parquet
+   *
+   * First test fsView API with finished clustering:
+   *  1. getLatestBaseFilesBeforeOrOn
+   *  2. getBaseFileOn
+   *  3. getLatestBaseFilesInRange
+   *  4. getAllBaseFiles
+   *  5. getLatestBaseFiles

Review comment:
       What about other base file related APIs like `fetchLatestBaseFiles`, `fetchAllBaseFiles`? Are they all covered by this change? 
   PS: I think we should take a follow up task to make FSView APIs more uniform. 




-- 
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] zhangyue19921010 commented on pull request #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   Hi @codope and @satishkotha Sorry to bother you. Would you mind to take a look at his patch?
   Thanks a lot :)


-- 
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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991",
       "triggerID" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5993",
       "triggerID" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7af5cab11b0de6be344b06affad7cdff4285405d Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991) 
   * c9de44f309ad09ef92f3cd212262d18302422978 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5993) 
   
   <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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82787b8461a0447467508cf2c7750870e57a8e8a Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981) 
   
   <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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991",
       "triggerID" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5993",
       "triggerID" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e7f2297be7ee21f54a2600433537d3fcb83f3f7b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6009",
       "triggerID" : "e7f2297be7ee21f54a2600433537d3fcb83f3f7b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c9de44f309ad09ef92f3cd212262d18302422978 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5993) 
   * e7f2297be7ee21f54a2600433537d3fcb83f3f7b Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6009) 
   
   <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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991",
       "triggerID" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82787b8461a0447467508cf2c7750870e57a8e8a Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981) 
   * 7af5cab11b0de6be344b06affad7cdff4285405d Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991) 
   * c9de44f309ad09ef92f3cd212262d18302422978 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 removed a comment on pull request #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82787b8461a0447467508cf2c7750870e57a8e8a Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981) 
   * 7af5cab11b0de6be344b06affad7cdff4285405d 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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82787b8461a0447467508cf2c7750870e57a8e8a Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981) 
   * 7af5cab11b0de6be344b06affad7cdff4285405d 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 removed a comment on pull request #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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






-- 
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] zhangyue19921010 commented on pull request #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView

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


   Here is the test table in my local env
   ```
   .
   ├── .hoodie
   │   ├── .aux
   │   │   └── .bootstrap
   │   │       ├── .fileids
   │   │       └── .partitions
   │   ├── .hoodie.properties.crc
   │   ├── .temp
   │   ├── 20220214113603048.replacecommit.inflight
   │   ├── 20220214113603048.replacecommit.requested
   │   ├── 20220214113742525.commit
   │   ├── 20220214113742525.commit.requested
   │   ├── 20220214113742525.inflight
   │   ├── 20220214113823507.commit
   │   ├── 20220214113823507.commit.requested
   │   ├── 20220214113823507.inflight
   │   ├── 20220214113906724.commit
   │   ├── 20220214113906724.commit.requested
   │   ├── 20220214113906724.inflight
   │   ├── 20220214113951921.commit
   │   ├── 20220214113951921.commit.requested
   │   ├── 20220214113951921.inflight
   │   ├── archived
   │   │   └── .commits_.archive.1_1-0-1
   │   └── hoodie.properties
   └── 20210623
       ├── .hoodie_partition_metadata
       ├── 08097b95-8096-42bf-81ee-9b9719af72e5-0_1-12-0_20220214113742525.parquet
       ├── 22c58520-9743-42f7-9bca-cfd1c250af7d-0_1-12-0_20220214113503975.parquet
       ├── 2fef7543-30bd-495d-ad06-ad9e17d00220-0_0-11-0_20220214113823507.parquet
       ├── 31ebf933-f1db-4d8e-841c-276faf50e6d9-0_0-11-0_20220214113906724.parquet
       ├── 383fea19-f097-4682-91c5-7dd43b4116d3-0_1-12-0_20220214113951921.parquet
       ├── 500c0898-2367-4de1-9d42-d40a41e50dbc-0_0-3-4_20220214113603048.parquet
       ├── c6e497de-4c2a-4d89-9f7f-fa07bcab3d6c-0_0-11-0_20220214113742525.parquet
       ├── c9e25ea5-6571-47a1-befe-463a3e383f26-0_0-11-0_20220214113503975.parquet
       ├── e454fcfd-8176-4d94-bf43-8a8d7c9a15ba-0_0-11-0_20220214113951921.parquet
       ├── e881db1c-4aba-4627-8adf-b893b1ffc70c-0_1-12-0_20220214113906724.parquet
       └── f044cb05-e191-4db6-b094-7c86b1ad3df8-0_1-12-0_20220214113823507.parquet
   ```
   
   
   Query 
   ```
   select count(*) from hudi_test
   ```
   
   
   result with `20220214113603048.replacecommit` ==> 5179250
   result without `20220214113603048.replacecommit` ==> 6215100
   
   As we can see the result is duplicated.


-- 
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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82787b8461a0447467508cf2c7750870e57a8e8a Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981) 
   
   <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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991",
       "triggerID" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5993",
       "triggerID" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7af5cab11b0de6be344b06affad7cdff4285405d Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991) 
   * c9de44f309ad09ef92f3cd212262d18302422978 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5993) 
   
   <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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991",
       "triggerID" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5993",
       "triggerID" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c9de44f309ad09ef92f3cd212262d18302422978 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5993) 
   
   <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] zhangyue19921010 commented on a change in pull request #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java
##########
@@ -380,6 +380,19 @@ protected boolean isBaseFileDueToPendingCompaction(HoodieBaseFile baseFile) {
         && baseFile.getCommitTime().equals(compactionWithInstantTime.get().getKey());
   }
 
+  /**
+   * With async clustering, it is possible to see partial/complete base-files due to inflight-clustering, Ignore those
+   * base-files.
+   *
+   * @param baseFile base File
+   */
+  protected boolean isBaseFileDueToPendingClustering(HoodieBaseFile baseFile) {
+    List<String> pendingReplaceInstants =
+        metaClient.getActiveTimeline().filterPendingReplaceTimeline().getInstants().map(HoodieInstant::getTimestamp).collect(Collectors.toList());

Review comment:
       Emmm, maybe we can't use `fgIdToPendingClustering` to do filter here.
   Because the files recorded in `fgIdToPendingClustering` are committed file and need to be seen.
   What we need to filter here are the in-flight uncommitted data files produced by clustering job.
   
   So that we need to know the instant time of `xxxx.replacecommit.requested` or `xxxx.replacecommit.inflight` and use it to filter out uncommitted clustering creating data files instead of the files which need to be clustering.




-- 
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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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






-- 
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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991",
       "triggerID" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82787b8461a0447467508cf2c7750870e57a8e8a Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981) 
   * 7af5cab11b0de6be344b06affad7cdff4285405d Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991) 
   * c9de44f309ad09ef92f3cd212262d18302422978 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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82787b8461a0447467508cf2c7750870e57a8e8a Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981) 
   
   <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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82787b8461a0447467508cf2c7750870e57a8e8a 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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82787b8461a0447467508cf2c7750870e57a8e8a Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981) 
   
   <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 #4810: [HUDI-3421]Pending clustering may break AbstractTableFileSystemView#getxxBaseFile()

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5981",
       "triggerID" : "82787b8461a0447467508cf2c7750870e57a8e8a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5991",
       "triggerID" : "7af5cab11b0de6be344b06affad7cdff4285405d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5993",
       "triggerID" : "c9de44f309ad09ef92f3cd212262d18302422978",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e7f2297be7ee21f54a2600433537d3fcb83f3f7b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "e7f2297be7ee21f54a2600433537d3fcb83f3f7b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c9de44f309ad09ef92f3cd212262d18302422978 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5993) 
   * e7f2297be7ee21f54a2600433537d3fcb83f3f7b 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