You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "yihua (via GitHub)" <gi...@apache.org> on 2026/09/13 17:49:24 UTC

[PR] fix(core): keep plan generator extra metadata when scheduling compaction [hudi]

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

   ### Describe the issue this Pull Request addresses
   
   closes #19939
   
   `BaseHoodieCompactionPlanGenerator` lets a plan generator record its own state in the plan's extra metadata, which incremental strategies use to remember the partitions they skipped. Since #18183 the table service client enriches the caller's extra-metadata option before scheduling, so it is never empty, and `ScheduleCompactionActionExecutor` then replaces the plan's map with it. The generator's entries are dropped on every schedule and such strategies silently fall back to full scans.
   
   ### Summary and Changelog
   
   - `ScheduleCompactionActionExecutor.mergeExtraMetadata` merges the caller's entries into the plan's existing extra metadata; entries only the generator produces take precedence on a key collision, and every other caller entry is kept. Log compaction shares the path.
   - Tests: unit cases in `TestScheduleCompactionActionExecutor` for the merge, and a functional case in `TestHoodieCompactor` that schedules through the write client with a generator that writes a marker entry, asserting both the generator marker and an explicit caller entry are on the persisted plan.
   
   ### Impact
   
   Plans keep both the writer-level entries added on scheduling and the generator's own entries. No public API change.
   
   ### Risk Level
   
   low. Only the composition of the plan's extra metadata changes; callers that passed explicit metadata still see their values.
   
   ### Documentation Update
   
   none
   
   ### Contributor's checklist
   
   - [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [x] Enough context is provided in the sections above
   - [x] 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(core): keep plan generator extra metadata when scheduling compaction [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82ce65766f2c5a385bf0d385ea781a753ea68bd5",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17080",
       "triggerID" : "82ce65766f2c5a385bf0d385ea781a753ea68bd5",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82ce65766f2c5a385bf0d385ea781a753ea68bd5 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17080) 
   
   <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(core): keep plan generator extra metadata when scheduling compaction [hudi]

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


-- 
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(core): keep plan generator extra metadata when scheduling compaction [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82ce65766f2c5a385bf0d385ea781a753ea68bd5",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17080",
       "triggerID" : "82ce65766f2c5a385bf0d385ea781a753ea68bd5",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82ce65766f2c5a385bf0d385ea781a753ea68bd5 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17080) 
   
   <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(core): keep plan generator extra metadata when scheduling compaction [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82ce65766f2c5a385bf0d385ea781a753ea68bd5",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17080",
       "triggerID" : "82ce65766f2c5a385bf0d385ea781a753ea68bd5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7771dd14b320399d22e7cb85ed389e752a0cfb6d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17107",
       "triggerID" : "7771dd14b320399d22e7cb85ed389e752a0cfb6d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82ce65766f2c5a385bf0d385ea781a753ea68bd5 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17080) 
   * 7771dd14b320399d22e7cb85ed389e752a0cfb6d Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17107) 
   
   <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(core): keep plan generator extra metadata when scheduling compaction [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82ce65766f2c5a385bf0d385ea781a753ea68bd5",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "82ce65766f2c5a385bf0d385ea781a753ea68bd5",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82ce65766f2c5a385bf0d385ea781a753ea68bd5 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(core): keep plan generator extra metadata when scheduling compaction [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82ce65766f2c5a385bf0d385ea781a753ea68bd5",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17080",
       "triggerID" : "82ce65766f2c5a385bf0d385ea781a753ea68bd5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7771dd14b320399d22e7cb85ed389e752a0cfb6d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7771dd14b320399d22e7cb85ed389e752a0cfb6d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82ce65766f2c5a385bf0d385ea781a753ea68bd5 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17080) 
   * 7771dd14b320399d22e7cb85ed389e752a0cfb6d 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(core): keep plan generator extra metadata when scheduling compaction [hudi]

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

   ## [Codecov](https://app.codecov.io/gh/apache/hudi/pull/19941?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `62.50000%` with `3 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 80.23%. Comparing base ([`1f5a4fe`](https://app.codecov.io/gh/apache/hudi/commit/1f5a4fe53aaadd69d91a208a833ace990ae06122?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`82ce657`](https://app.codecov.io/gh/apache/hudi/commit/82ce65766f2c5a385bf0d385ea781a753ea68bd5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/19941?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...tion/compact/ScheduleCompactionActionExecutor.java](https://app.codecov.io/gh/apache/hudi/pull/19941?src=pr&el=tree&filepath=hudi-client%2Fhudi-client-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Ftable%2Faction%2Fcompact%2FScheduleCompactionActionExecutor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS1jbGllbnQvaHVkaS1jbGllbnQtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL3RhYmxlL2FjdGlvbi9jb21wYWN0L1NjaGVkdWxlQ29tcGFjdGlvbkFjdGlvbkV4ZWN1dG9yLmphdmE=) | 62.50% | [1 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/hudi/pull/19941?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #19941      +/-   ##
   ============================================
   - Coverage     80.23%   80.23%   -0.01%     
     Complexity    34747    34747              
   ============================================
     Files          2546     2546              
     Lines        142608   142615       +7     
     Branches      17362    17363       +1     
   ============================================
   + Hits         114419   114421       +2     
   - Misses        20277    20279       +2     
   - Partials       7912     7915       +3     
   ```
   
   | [Components](https://app.codecov.io/gh/apache/hudi/pull/19941/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [hudi-common](https://app.codecov.io/gh/apache/hudi/pull/19941/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.84% <ø> (-0.01%)` | :arrow_down: |
   | [hudi-client](https://app.codecov.io/gh/apache/hudi/pull/19941/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.32% <62.50%> (-0.01%)` | :arrow_down: |
   | [hudi-flink](https://app.codecov.io/gh/apache/hudi/pull/19941/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `85.57% <ø> (ø)` | |
   | [hudi-spark-datasource](https://app.codecov.io/gh/apache/hudi/pull/19941/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.25% <ø> (ø)` | |
   | [hudi-utilities](https://app.codecov.io/gh/apache/hudi/pull/19941/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.19% <ø> (ø)` | |
   | [hudi-cli](https://app.codecov.io/gh/apache/hudi/pull/19941/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `69.99% <ø> (ø)` | |
   | [hudi-hadoop](https://app.codecov.io/gh/apache/hudi/pull/19941/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.89% <ø> (ø)` | |
   | [hudi-sync](https://app.codecov.io/gh/apache/hudi/pull/19941/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `76.02% <ø> (ø)` | |
   | [hudi-io](https://app.codecov.io/gh/apache/hudi/pull/19941/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `81.61% <ø> (ø)` | |
   | [hudi-timeline-service](https://app.codecov.io/gh/apache/hudi/pull/19941/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.34% <ø> (ø)` | |
   | [hudi-cloud](https://app.codecov.io/gh/apache/hudi/pull/19941/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `80.99% <ø> (ø)` | |
   | [hudi-kafka-connect](https://app.codecov.io/gh/apache/hudi/pull/19941/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `53.96% <ø> (ø)` | |
   
   | [Flag](https://app.codecov.io/gh/apache/hudi/pull/19941/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [hadoop-mr-java-client](https://app.codecov.io/gh/apache/hudi/pull/19941/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `43.88% <62.50%> (-0.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/19941?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...tion/compact/ScheduleCompactionActionExecutor.java](https://app.codecov.io/gh/apache/hudi/pull/19941?src=pr&el=tree&filepath=hudi-client%2Fhudi-client-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Ftable%2Faction%2Fcompact%2FScheduleCompactionActionExecutor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS1jbGllbnQvaHVkaS1jbGllbnQtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL3RhYmxlL2FjdGlvbi9jb21wYWN0L1NjaGVkdWxlQ29tcGFjdGlvbkFjdGlvbkV4ZWN1dG9yLmphdmE=) | `85.36% <62.50%> (-1.71%)` | :arrow_down: |
   
   ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/apache/hudi/pull/19941/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </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