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/08/01 09:39:30 UTC

[GitHub] [hudi] codope opened a new pull request, #6266: [HUDI-4517] If no marker type file, fallback to timeline based marker

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

   ## What is the purpose of the pull request
   
   If `MARKERS.type` file is not present, the logic assumes that the direct markers are stored, which causes the read failure in certain cases even where timeline server based marker is enabled. This PR handles the failure by falling back to timeline based marker in such cases.
   
   See #5591 for more details.
   
   ## 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] xushiyan commented on a diff in pull request #6266: [HUDI-4517] If no marker type file, fallback to timeline based marker

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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/marker/MarkerBasedRollbackUtils.java:
##########
@@ -56,10 +56,16 @@ public static List<String> getAllMarkerPaths(HoodieTable table, HoodieEngineCont
     FileSystem fileSystem = table.getMetaClient().getFs();
     Option<MarkerType> markerTypeOption = MarkerUtils.readMarkerType(fileSystem, markerDir);
 
-    // If there is no marker type file "MARKERS.type", we assume "DIRECT" markers are used
+    // If there is no marker type file "MARKERS.type", first assume "DIRECT" markers are used.
+    // If not, then fallback to "TIMELINE_SERVER_BASED" markers.
     if (!markerTypeOption.isPresent()) {
       WriteMarkers writeMarkers = WriteMarkersFactory.get(MarkerType.DIRECT, table, instant);
-      return new ArrayList<>(writeMarkers.allMarkerFilePaths());
+      try {
+        return new ArrayList<>(writeMarkers.allMarkerFilePaths());
+      } catch (Exception e) {

Review Comment:
   default is TIMELINE_SERVER_BASED, why not assume TIMELINE_SERVER_BASED first then fallback?



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/marker/MarkerBasedRollbackUtils.java:
##########
@@ -56,10 +56,16 @@ public static List<String> getAllMarkerPaths(HoodieTable table, HoodieEngineCont
     FileSystem fileSystem = table.getMetaClient().getFs();
     Option<MarkerType> markerTypeOption = MarkerUtils.readMarkerType(fileSystem, markerDir);
 
-    // If there is no marker type file "MARKERS.type", we assume "DIRECT" markers are used
+    // If there is no marker type file "MARKERS.type", first assume "DIRECT" markers are used.
+    // If not, then fallback to "TIMELINE_SERVER_BASED" markers.
     if (!markerTypeOption.isPresent()) {
       WriteMarkers writeMarkers = WriteMarkersFactory.get(MarkerType.DIRECT, table, instant);
-      return new ArrayList<>(writeMarkers.allMarkerFilePaths());
+      try {
+        return new ArrayList<>(writeMarkers.allMarkerFilePaths());
+      } catch (Exception e) {

Review Comment:
   shouldn't there be some specific exception for this case to catch?



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/marker/MarkerBasedRollbackUtils.java:
##########
@@ -56,10 +56,16 @@ public static List<String> getAllMarkerPaths(HoodieTable table, HoodieEngineCont
     FileSystem fileSystem = table.getMetaClient().getFs();
     Option<MarkerType> markerTypeOption = MarkerUtils.readMarkerType(fileSystem, markerDir);
 
-    // If there is no marker type file "MARKERS.type", we assume "DIRECT" markers are used
+    // If there is no marker type file "MARKERS.type", first assume "DIRECT" markers are used.
+    // If not, then fallback to "TIMELINE_SERVER_BASED" markers.
     if (!markerTypeOption.isPresent()) {
       WriteMarkers writeMarkers = WriteMarkersFactory.get(MarkerType.DIRECT, table, instant);
-      return new ArrayList<>(writeMarkers.allMarkerFilePaths());
+      try {
+        return new ArrayList<>(writeMarkers.allMarkerFilePaths());
+      } catch (Exception e) {

Review Comment:
   also can you clarify in what cases we may have marker type not known?



-- 
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 #6266: [HUDI-4517] If no marker type file, fallback to timeline based marker

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

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] xushiyan commented on pull request #6266: [HUDI-4517] If no marker type file, fallback to timeline based marker

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

   <img width="601" alt="Screen Shot 2022-08-06 at 10 07 12 PM" src="https://user-images.githubusercontent.com/2701446/183273262-0e10ccc1-4256-427b-9323-3b580b767825.png">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] codope commented on a diff in pull request #6266: [HUDI-4517] If no marker type file, fallback to timeline based marker

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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/marker/MarkerBasedRollbackUtils.java:
##########
@@ -56,10 +56,16 @@ public static List<String> getAllMarkerPaths(HoodieTable table, HoodieEngineCont
     FileSystem fileSystem = table.getMetaClient().getFs();
     Option<MarkerType> markerTypeOption = MarkerUtils.readMarkerType(fileSystem, markerDir);
 
-    // If there is no marker type file "MARKERS.type", we assume "DIRECT" markers are used
+    // If there is no marker type file "MARKERS.type", first assume "DIRECT" markers are used.
+    // If not, then fallback to "TIMELINE_SERVER_BASED" markers.
     if (!markerTypeOption.isPresent()) {
       WriteMarkers writeMarkers = WriteMarkersFactory.get(MarkerType.DIRECT, table, instant);
-      return new ArrayList<>(writeMarkers.allMarkerFilePaths());
+      try {
+        return new ArrayList<>(writeMarkers.allMarkerFilePaths());
+      } catch (Exception e) {

Review Comment:
   > shouldn't there be some specific exception for this case to catch?
   
   Yes, the code path could throw IllegalArgumentException or IOException. I can catch specific exception instead of blanket fallback.
   
   > default is TIMELINE_SERVER_BASED, why not assume TIMELINE_SERVER_BASED first then fallback?
   
   In case of TIMELINE_SERVER_BASED, the marker type file should be written ideally. If it's not present then most likely DIRECT marker is being used. Hence, the most probable scenario first.
   
   > also can you clarify in what cases we may have marker type not known?
   
   Ofc DIRECT marker is one case. However, in case of TIMELINE_SERVER_BASED let's say marker dir creation succeeded but marker type file creation failed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] nsivabalan commented on a diff in pull request #6266: [HUDI-4517] If no marker type file, fallback to timeline based marker

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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/marker/MarkerBasedRollbackUtils.java:
##########
@@ -54,25 +64,35 @@ public static List<String> getAllMarkerPaths(HoodieTable table, HoodieEngineCont
                                                String instant, int parallelism) throws IOException {
     String markerDir = table.getMetaClient().getMarkerFolderPath(instant);
     FileSystem fileSystem = table.getMetaClient().getFs();
-    Option<MarkerType> markerTypeOption = MarkerUtils.readMarkerType(fileSystem, markerDir);
+    Option<MarkerType> markerTypeOption = readMarkerType(fileSystem, markerDir);
 
-    // If there is no marker type file "MARKERS.type", we assume "DIRECT" markers are used
+    // If there is no marker type file "MARKERS.type", first assume "DIRECT" markers are used.
+    // If not, then fallback to "TIMELINE_SERVER_BASED" markers.

Review Comment:
   that makes sense. thanks for finding the potential root cause. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] codope commented on a diff in pull request #6266: [HUDI-4517] If no marker type file, fallback to timeline based marker

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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/marker/MarkerBasedRollbackUtils.java:
##########
@@ -54,25 +64,35 @@ public static List<String> getAllMarkerPaths(HoodieTable table, HoodieEngineCont
                                                String instant, int parallelism) throws IOException {
     String markerDir = table.getMetaClient().getMarkerFolderPath(instant);
     FileSystem fileSystem = table.getMetaClient().getFs();
-    Option<MarkerType> markerTypeOption = MarkerUtils.readMarkerType(fileSystem, markerDir);
+    Option<MarkerType> markerTypeOption = readMarkerType(fileSystem, markerDir);
 
-    // If there is no marker type file "MARKERS.type", we assume "DIRECT" markers are used
+    // If there is no marker type file "MARKERS.type", first assume "DIRECT" markers are used.
+    // If not, then fallback to "TIMELINE_SERVER_BASED" markers.

Review Comment:
   That's possible. However, it was reported in #5591 that the rollback failed.
   The other thing is that the creation  of marker type file is contingent on existence of marker dir. What if the first time marker dir got created but marker type file was not created, then on retry `MarkerDirState#writeMarkerTypeToFile` sees that the marker dr already exists so it skips marker type file creation and sets `isMarkerTypeWritten` to true and goes ahead with writing marker files. For such cases, we need to explicitly check whether marker type file exists or not. 



-- 
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 pull request #6266: [HUDI-4517] If no marker type file, fallback to timeline based marker

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

   Successful CI https://dev.azure.com/apache-hudi-ci-org/apache-hudi-ci/_build/results?buildId=10614&view=results


-- 
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 #6266: [HUDI-4517] If no marker type file, fallback to timeline based marker

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0d4f1037dad7db5b79d996e0e701400d0c07a2de",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10493",
       "triggerID" : "0d4f1037dad7db5b79d996e0e701400d0c07a2de",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0d4f1037dad7db5b79d996e0e701400d0c07a2de Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10493) 
   
   <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 #6266: [HUDI-4517] If no marker type file, fallback to timeline based marker

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0d4f1037dad7db5b79d996e0e701400d0c07a2de",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10493",
       "triggerID" : "0d4f1037dad7db5b79d996e0e701400d0c07a2de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "47f5c73193af282b3a229375be9351a91f613f5c",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10614",
       "triggerID" : "47f5c73193af282b3a229375be9351a91f613f5c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0d4f1037dad7db5b79d996e0e701400d0c07a2de Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10493) 
   * 47f5c73193af282b3a229375be9351a91f613f5c Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10614) 
   
   <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 #6266: [HUDI-4517] If no marker type file, fallback to timeline based marker

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0d4f1037dad7db5b79d996e0e701400d0c07a2de",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10493",
       "triggerID" : "0d4f1037dad7db5b79d996e0e701400d0c07a2de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "47f5c73193af282b3a229375be9351a91f613f5c",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10614",
       "triggerID" : "47f5c73193af282b3a229375be9351a91f613f5c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 47f5c73193af282b3a229375be9351a91f613f5c Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10614) 
   
   <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 merged pull request #6266: [HUDI-4517] If no marker type file, fallback to timeline based marker

Posted by GitBox <gi...@apache.org>.
nsivabalan merged PR #6266:
URL: https://github.com/apache/hudi/pull/6266


-- 
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 #6266: [HUDI-4517] If no marker type file, fallback to timeline based marker

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0d4f1037dad7db5b79d996e0e701400d0c07a2de",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10493",
       "triggerID" : "0d4f1037dad7db5b79d996e0e701400d0c07a2de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "47f5c73193af282b3a229375be9351a91f613f5c",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "47f5c73193af282b3a229375be9351a91f613f5c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0d4f1037dad7db5b79d996e0e701400d0c07a2de Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10493) 
   * 47f5c73193af282b3a229375be9351a91f613f5c 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 a diff in pull request #6266: [HUDI-4517] If no marker type file, fallback to timeline based marker

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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/marker/MarkerBasedRollbackUtils.java:
##########
@@ -54,25 +64,35 @@ public static List<String> getAllMarkerPaths(HoodieTable table, HoodieEngineCont
                                                String instant, int parallelism) throws IOException {
     String markerDir = table.getMetaClient().getMarkerFolderPath(instant);
     FileSystem fileSystem = table.getMetaClient().getFs();
-    Option<MarkerType> markerTypeOption = MarkerUtils.readMarkerType(fileSystem, markerDir);
+    Option<MarkerType> markerTypeOption = readMarkerType(fileSystem, markerDir);
 
-    // If there is no marker type file "MARKERS.type", we assume "DIRECT" markers are used
+    // If there is no marker type file "MARKERS.type", first assume "DIRECT" markers are used.
+    // If not, then fallback to "TIMELINE_SERVER_BASED" markers.

Review Comment:
   there is one flow where we could end up in this situation, but I could not piece end to end fully together. 
   Lets say, rollback was triggered using timeline based markers. Towards the end, when everything is complete, we go ahead and delete the marker directory. During this, lets say marker type file was deleted, but before deleting all markers, process crashed. We might  end up in this state. But from looking at the code, rollback is actually complete by now (i.e. original commit files would have been deleted, and infact rollback commit would also be completed by now. So, a failure during deletion of marker directory should not have any impact. rollback will never be re-triggered for this case. 
   
   Let me know if you guys can think of a scenario where this could happen. would really love to find the root cause. 
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] nsivabalan commented on a diff in pull request #6266: [HUDI-4517] If no marker type file, fallback to timeline based marker

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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/marker/MarkerBasedRollbackUtils.java:
##########
@@ -54,25 +64,35 @@ public static List<String> getAllMarkerPaths(HoodieTable table, HoodieEngineCont
                                                String instant, int parallelism) throws IOException {
     String markerDir = table.getMetaClient().getMarkerFolderPath(instant);
     FileSystem fileSystem = table.getMetaClient().getFs();
-    Option<MarkerType> markerTypeOption = MarkerUtils.readMarkerType(fileSystem, markerDir);
+    Option<MarkerType> markerTypeOption = readMarkerType(fileSystem, markerDir);
 
-    // If there is no marker type file "MARKERS.type", we assume "DIRECT" markers are used
+    // If there is no marker type file "MARKERS.type", first assume "DIRECT" markers are used.
+    // If not, then fallback to "TIMELINE_SERVER_BASED" markers.

Review Comment:
   I inspected the code again to see if there will be a chance where marker type will be missing in timeline server based markers. [looks like ](https://github.com/apache/hudi/blob/ae7395df1e13112a1d99675edb04af05d0242703/hudi-timeline-service/src/main/java/org/apache/hudi/timeline/service/handlers/marker/MarkerDirState.java#L213) we first create the marker type file before  creating any markers. may be just the directory will exists w/o any marker type file and w/o any makers. But there should not be a case where marker type is missing and there are valid markers found incase of TimelineBasedMarkers. 
   
   



-- 
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 #6266: [HUDI-4517] If no marker type file, fallback to timeline based marker

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0d4f1037dad7db5b79d996e0e701400d0c07a2de",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10493",
       "triggerID" : "0d4f1037dad7db5b79d996e0e701400d0c07a2de",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0d4f1037dad7db5b79d996e0e701400d0c07a2de Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10493) 
   
   <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 #6266: [HUDI-4517] If no marker type file, fallback to timeline based marker

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

   LGTM


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