You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "danny0405 (via GitHub)" <gi...@apache.org> on 2025/10/15 12:15:05 UTC

[PR] fix: flink mdt compaction should finish pending compactions first [hudi]

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

   ### Describe the issue this Pull Request addresses
   
   The flink mdt compaction misses the pending compactions before scheduling new one, there is possibility these pending compactions would block the new compaction scheduling forever for some partition type like "files" which has just 1 file group.
   
   ### Summary and Changelog
   
   - fix the Flink mdt compaction to be in line with the other engines;
   - fix the compaction in flink write client to handle compaction instant conflicts.
   
   ### Impact
   
   minor perf diff there because of the new introduced mdt timeline reloading.
   
   ### Risk Level
   
   low
   
   ### Documentation Update
   
   none
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Enough context is provided in the sections above
   - [ ] Adequate tests were added if applicable
   


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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14095:
URL: https://github.com/apache/hudi/pull/14095#issuecomment-3406783839

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9169",
       "triggerID" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9171",
       "triggerID" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ee484d1de33436bc7e4d93a94df33fab80c342af",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9172",
       "triggerID" : "ee484d1de33436bc7e4d93a94df33fab80c342af",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8e6a5aeccb4418da14b0b894f011651a5261fc6f Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9171) 
   * ee484d1de33436bc7e4d93a94df33fab80c342af Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9172) 
   
   <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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on PR #14095:
URL: https://github.com/apache/hudi/pull/14095#issuecomment-3409480341

   > Is there a linked issue for this?
   
   Not really, the fix comes from my code reivew while debugging the Flink upgrade issue.


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

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

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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on PR #14095:
URL: https://github.com/apache/hudi/pull/14095#issuecomment-3410238529

   > Just curious, were there any considerations as to why the `commitInternal` was overridden ?
   
   No, it's just legacy code, it was in line with Spark before but keep as unchanged when Spark refactored the logic.


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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14095:
URL: https://github.com/apache/hudi/pull/14095#issuecomment-3408796014

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9169",
       "triggerID" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9171",
       "triggerID" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ee484d1de33436bc7e4d93a94df33fab80c342af",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9172",
       "triggerID" : "ee484d1de33436bc7e4d93a94df33fab80c342af",
       "triggerType" : "PUSH"
     }, {
       "hash" : "98d94eeadcd3cd4a2ae83bf4e21048f6a6018679",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9182",
       "triggerID" : "98d94eeadcd3cd4a2ae83bf4e21048f6a6018679",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ee484d1de33436bc7e4d93a94df33fab80c342af Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9172) 
   * 98d94eeadcd3cd4a2ae83bf4e21048f6a6018679 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9182) 
   
   <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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14095:
URL: https://github.com/apache/hudi/pull/14095#issuecomment-3406638684

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9169",
       "triggerID" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9171",
       "triggerID" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ccb878918de9fd60f9770241f82c3f2299b58bf0 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9169) 
   * 8e6a5aeccb4418da14b0b894f011651a5261fc6f Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9171) 
   
   <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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14095:
URL: https://github.com/apache/hudi/pull/14095#issuecomment-3406116007

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ccb878918de9fd60f9770241f82c3f2299b58bf0 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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14095:
URL: https://github.com/apache/hudi/pull/14095#issuecomment-3408987736

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9169",
       "triggerID" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9171",
       "triggerID" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ee484d1de33436bc7e4d93a94df33fab80c342af",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9172",
       "triggerID" : "ee484d1de33436bc7e4d93a94df33fab80c342af",
       "triggerType" : "PUSH"
     }, {
       "hash" : "98d94eeadcd3cd4a2ae83bf4e21048f6a6018679",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9182",
       "triggerID" : "98d94eeadcd3cd4a2ae83bf4e21048f6a6018679",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 98d94eeadcd3cd4a2ae83bf4e21048f6a6018679 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9182) 
   
   <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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 merged PR #14095:
URL: https://github.com/apache/hudi/pull/14095


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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14095:
URL: https://github.com/apache/hudi/pull/14095#issuecomment-3406482513

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9169",
       "triggerID" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ccb878918de9fd60f9770241f82c3f2299b58bf0 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9169) 
   * 8e6a5aeccb4418da14b0b894f011651a5261fc6f 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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14095:
URL: https://github.com/apache/hudi/pull/14095#issuecomment-3406121039

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9169",
       "triggerID" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ccb878918de9fd60f9770241f82c3f2299b58bf0 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9169) 
   
   <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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "voonhous (via GitHub)" <gi...@apache.org>.
voonhous commented on PR #14095:
URL: https://github.com/apache/hudi/pull/14095#issuecomment-3409963608

   FWIU, the issue is:
   
   1. MDT compaction fails, compaction is never committed, there may be inflight compaction
   2. `FlinkHoodieBackedTableMetadataWriter.commitInternal` -> `compactIfNecessary(writeClient, Option.empty());
   `: This method would schedule and execute a NEW compaction, but it never completed pending compactions from previous failed attempts.
   
   
   The fix is to delegate to the parent class which invokes `writeClient.runAnyPendingCompactions` and which is mostly identical. Please CMIIW.
   
   Just curious, were there any considerations as to why the commitInternal was overwritten?
   


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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14095:
URL: https://github.com/apache/hudi/pull/14095#issuecomment-3407228521

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9169",
       "triggerID" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9171",
       "triggerID" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ee484d1de33436bc7e4d93a94df33fab80c342af",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9172",
       "triggerID" : "ee484d1de33436bc7e4d93a94df33fab80c342af",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ee484d1de33436bc7e4d93a94df33fab80c342af Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9172) 
   
   <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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14095:
URL: https://github.com/apache/hudi/pull/14095#issuecomment-3406677655

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9169",
       "triggerID" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9171",
       "triggerID" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8e6a5aeccb4418da14b0b894f011651a5261fc6f Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9171) 
   
   <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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "voonhous (via GitHub)" <gi...@apache.org>.
voonhous commented on PR #14095:
URL: https://github.com/apache/hudi/pull/14095#issuecomment-3408969135

   Is there a linked issue for this? 


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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14095:
URL: https://github.com/apache/hudi/pull/14095#issuecomment-3406488909

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9169",
       "triggerID" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9171",
       "triggerID" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ccb878918de9fd60f9770241f82c3f2299b58bf0 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9169) 
   * 8e6a5aeccb4418da14b0b894f011651a5261fc6f Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9171) 
   
   <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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #14095:
URL: https://github.com/apache/hudi/pull/14095#discussion_r2432794527


##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/metadata/FlinkHoodieBackedTableMetadataWriter.java:
##########
@@ -126,60 +123,10 @@ protected void bulkCommit(String instantTime, String partitionPath, HoodieData<H
   @Override
   protected void commitInternal(String instantTime, Map<String, HoodieData<HoodieRecord>> partitionRecordsMap, boolean isInitializing,
                                 Option<BulkInsertPartitioner> bulkInsertPartitioner) {
-    ValidationUtils.checkState(metadataMetaClient != null, "Metadata table is not fully initialized yet.");
-    HoodieData<HoodieRecord> preppedRecords = tagRecordsWithLocation(partitionRecordsMap, isInitializing).getKey();
-    List<HoodieRecord> preppedRecordList = preppedRecords.collectAsList();
-
-    //  Flink engine does not optimize initialCommit to MDT as bulk insert is not yet supported
-
-    BaseHoodieWriteClient<?, List<HoodieRecord>, ?, List<WriteStatus>> writeClient = (BaseHoodieWriteClient<?, List<HoodieRecord>, ?, List<WriteStatus>>) getWriteClient();
-    // rollback partially failed writes if any.
-    if (writeClient.rollbackFailedWrites(metadataMetaClient)) {
-      metadataMetaClient = HoodieTableMetaClient.reload(metadataMetaClient);
-    }
-
-    compactIfNecessary(writeClient, Option.empty());
-
-    if (!metadataMetaClient.getActiveTimeline().containsInstant(instantTime)) {
-      // if this is a new commit being applied to metadata for the first time
-      LOG.info("New commit at " + instantTime + " being applied to MDT.");
-    } else {
-      // this code path refers to a re-attempted commit that:
-      //   1. got committed to metadata table, but failed in datatable.
-      //   2. failed while committing to metadata table
-      // for e.g., let's say compaction c1 on 1st attempt succeeded in metadata table and failed before committing to datatable.
-      // when retried again, data table will first rollback pending compaction. these will be applied to metadata table, but all changes
-      // are upserts to metadata table and so only a new delta commit will be created.
-      // once rollback is complete in datatable, compaction will be retried again, which will eventually hit this code block where the respective commit is
-      // already part of completed commit. So, we have to manually rollback the completed instant and proceed.
-      Option<HoodieInstant> alreadyCompletedInstant = metadataMetaClient.getActiveTimeline().filterCompletedInstants().filter(entry -> entry.requestedTime().equals(instantTime))
-          .lastInstant();
-      LOG.info(String.format("%s completed commit at %s being applied to MDT.",
-          alreadyCompletedInstant.isPresent() ? "Already" : "Partially", instantTime));
-
-      // Rollback the previous commit
-      if (!writeClient.rollback(instantTime)) {
-        throw new HoodieMetadataException("Failed to rollback deltacommit at " + instantTime + " from MDT");
-      }
-      metadataMetaClient.reloadActiveTimeline();
-    }
-
-    writeClient.startCommitForMetadataTable(metadataMetaClient, instantTime, HoodieActiveTimeline.DELTA_COMMIT_ACTION);
-    preWrite(instantTime);
-
-    List<WriteStatus> statuses = isInitializing
-        ? writeClient.bulkInsertPreppedRecords(preppedRecordList, instantTime, bulkInsertPartitioner)
-        : writeClient.upsertPreppedRecords(preppedRecordList, instantTime);
-    // flink does not support auto-commit yet, also the auto commit logic is not complete as BaseHoodieWriteClient now.
-    writeClient.commit(instantTime, statuses, Option.empty(), HoodieActiveTimeline.DELTA_COMMIT_ACTION, Collections.emptyMap());
-
-    // reload timeline
-    metadataMetaClient.reloadActiveTimeline();
-    cleanIfNecessary(writeClient, "");
-    writeClient.archive();
-
-    // Update total size of the metadata and count of base/log files
-    metrics.ifPresent(m -> m.updateSizeMetrics(metadataMetaClient, metadata, dataMetaClient.getTableConfig().getMetadataPartitions()));
+    performTableServices(Option.ofNullable(instantTime), false);
+    // the timeline reload should be unnecessary
+    // metadataMetaClient.reloadActiveTimeline();

Review Comment:
   cc @nsivabalan to confirm this, it looks like the logic in `super.commitInternal` still works no matter whether the mdt timeline reloaded or not.
   
   Another thing I want to confirm is inside `super.commitInternal`, in the last step there is also a mdt timeline reloead, seems also unnecessary because most of the callers just close the mdt writer instantly after the `#update`.



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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14095:
URL: https://github.com/apache/hudi/pull/14095#issuecomment-3406727767

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9169",
       "triggerID" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9171",
       "triggerID" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ee484d1de33436bc7e4d93a94df33fab80c342af",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "ee484d1de33436bc7e4d93a94df33fab80c342af",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8e6a5aeccb4418da14b0b894f011651a5261fc6f Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9171) 
   * ee484d1de33436bc7e4d93a94df33fab80c342af 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


Re: [PR] fix: flink mdt compaction should finish pending compactions first [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14095:
URL: https://github.com/apache/hudi/pull/14095#issuecomment-3408792632

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9169",
       "triggerID" : "ccb878918de9fd60f9770241f82c3f2299b58bf0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9171",
       "triggerID" : "8e6a5aeccb4418da14b0b894f011651a5261fc6f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ee484d1de33436bc7e4d93a94df33fab80c342af",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9172",
       "triggerID" : "ee484d1de33436bc7e4d93a94df33fab80c342af",
       "triggerType" : "PUSH"
     }, {
       "hash" : "98d94eeadcd3cd4a2ae83bf4e21048f6a6018679",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "98d94eeadcd3cd4a2ae83bf4e21048f6a6018679",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ee484d1de33436bc7e4d93a94df33fab80c342af Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9172) 
   * 98d94eeadcd3cd4a2ae83bf4e21048f6a6018679 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