fix(flink): improve clustering resource cleanup and coverage - #19400
Conversation
06bd669 to
f239f45
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19400 +/- ##
============================================
+ Coverage 72.19% 73.64% +1.44%
- Complexity 32595 32815 +220
============================================
Files 2561 2574 +13
Lines 148328 146111 -2217
Branches 18654 18147 -507
============================================
+ Hits 107087 107605 +518
+ Misses 32774 30416 -2358
+ Partials 8467 8090 -377
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
f239f45 to
b3cde65
Compare
hudi-agent
left a comment
There was a problem hiding this comment.
Thanks for working on this! This PR adds Flink operator-harness and unit tests for the clustering operator, clustering commit sink, consistent-bucket update strategy, and compaction plan source function, with no production code changes. No correctness issues found. A few style/readability suggestions in the inline comments. Please take a look, and this should be ready for a Hudi committer or PMC member to take it from here. One minor naming nit in the test helper; the rest of the code is clean and well-structured.
cc @yihua
danny0405
left a comment
There was a problem hiding this comment.
The success paths look covered, but the new clustering tests expose an exception-path resource leak that should be addressed.
b3cde65 to
ab583a6
Compare
Close clustering readers, sorters, and writers on failures to prevent resource leaks in long-running Flink tasks. Expand coverage for the clustering operator, clustering commit sink, compaction plan source function, and consistent bucket update strategy. Addresses review comment 3670917473.
ab583a6 to
0b65db5
Compare
Describe the issue this Pull Request addresses
Closes #19397.
The Flink clustering and compaction operators and the consistent-bucket update strategy had low or missing unit-test coverage. The standalone job drivers remain integration-test-only and are tracked separately by ENG-44609 because that coverage is not currently uploaded.
Summary and Changelog
Local JaCoCo line coverage from the targeted suite:
ClusteringOperatorClusteringCommitSinkFlinkConsistentBucketUpdateStrategyCompactionPlanSourceFunctionImpact
No public API or user-facing behavior changes. This PR only adds tests.
Risk Level
Low. Production code is unchanged.
Validation
The targeted Maven and JaCoCo-instrumented test runs completed successfully:
Checkstyle and RAT also passed.
Documentation Update
None.
Contributor's checklist