Skip to content

fix(flink): Don't perform table service during mdt initialization if …#18283

Merged
danny0405 merged 1 commit intoapache:masterfrom
cshuo:fix_mdt_compact_on_init
Mar 6, 2026
Merged

fix(flink): Don't perform table service during mdt initialization if …#18283
danny0405 merged 1 commit intoapache:masterfrom
cshuo:fix_mdt_compact_on_init

Conversation

@cshuo
Copy link
Collaborator

@cshuo cshuo commented Mar 5, 2026

…streaming write is enabled

Describe the issue this Pull Request addresses

HoodieFlinkTableServiceClient#initMetadataTable() always ran performTableServices, even when metadata streaming write was enabled. In streaming mode, this should be skipped. fixes #18284

Summary and Changelog

  • Added a guard in initMetadataTable():
    • Run metadataWriter.performTableServices(...) only when hoodie.metadata.streaming.write.enabled=false.
  • Added a parameterized test to cover both streaming modes and verify invocation behavior.

Impact

  • Fixes incorrect metadata table service triggering in Flink streaming metadata mode.

Risk Level

low

Documentation Update

Contributor's checklist

  • Read through contributor's guide
  • Enough context is provided in the sections above
  • Adequate tests were added if applicable

@github-actions github-actions bot added the size:M PR with lines of changes in (100, 300] label Mar 5, 2026
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.24%. Comparing base (3dcf4c6) to head (919d803).

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18283      +/-   ##
============================================
+ Coverage     57.22%   57.24%   +0.01%     
+ Complexity    18607    18599       -8     
============================================
  Files          1951     1951              
  Lines        106765   106765              
  Branches      13198    13200       +2     
============================================
+ Hits          61099    61115      +16     
+ Misses        39901    39889      -12     
+ Partials       5765     5761       -4     
Flag Coverage Δ
hadoop-mr-java-client 45.24% <ø> (+<0.01%) ⬆️
spark-java-tests 47.41% <ø> (+0.04%) ⬆️
spark-scala-tests 45.51% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hudi-bot
Copy link
Collaborator

hudi-bot commented Mar 5, 2026

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@danny0405 danny0405 merged commit 6e0d786 into apache:master Mar 6, 2026
74 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M PR with lines of changes in (100, 300]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't perform table service during mdt initialization if streaming write is enabled

4 participants