fix(clean): address review comments on empty clean support (#18337)#18587
Conversation
- Rename config constant to INTERVAL_TO_CREATE_EMPTY_CLEAN_HOURS - Fix config key typo: internval -> interval - Rename builder/getter/parameter for consistency - Adjust ECTR to previous value instead of skipping empty clean when it would go backwards due to config changes
Rename getIntervalHoursToCreateEmptyClean to getIntervalToCreateEmptyCleanHours to match the builder method withIntervalToCreateEmptyCleanHours and codebase convention.
hudi-agent
left a comment
There was a problem hiding this comment.
🤖 This review was generated by an AI agent and may contain mistakes. Please verify any suggestions before applying.
Thanks for the follow-up! This PR renames the empty-clean config constants/methods for consistency, fixes a config key typo (internval → interval), and changes the ECTR-regression path to adjust rather than skip the empty clean. 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 small nit on the validation error message — otherwise the renaming and typo fix look clean.
cc @yihua
The error now states that -1 (disabled) is also a valid value, avoiding confusion for users who see only "must be >= 1".
The test was going from 24h->12h retention (decreasing), which makes ECTR move forward. The backwards check never triggered; the test passed because the null ECTR short-circuited the empty clean path. Fix: go from 12h->72h retention (increasing), which makes ECTR move backwards and actually exercises the adjustment logic. Assert that the second empty clean IS created with ECTR pinned to the previous value.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18587 +/- ##
============================================
- Coverage 68.89% 68.89% -0.01%
+ Complexity 28549 28536 -13
============================================
Files 2480 2480
Lines 136904 136904
Branches 16673 16676 +3
============================================
- Hits 94324 94321 -3
+ Misses 34994 34993 -1
- Partials 7586 7590 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Describe the issue this Pull Request addresses
Addresses review comments on #18337 (empty clean support). Renames config constants, builder methods, and getter to follow consistent naming, fixes a typo in the config key, and improves ECTR (earliestCommitToRetain) handling when cleaner configuration changes.
Summary and Changelog
MAX_INTERVAL_TO_CREATE_EMPTY_CLEAN_HOURStoINTERVAL_TO_CREATE_EMPTY_CLEAN_HOURShoodie.write.empty.clean.internval.hours→hoodie.write.empty.clean.interval.hourswithIntervalToCreateEmptyCleanHoursgetIntervalHoursToCreateEmptyCleanmaxDurationHourstoemptyCleanIntervalHoursImpact
No public API changes. Config key spelling fix (
internval→interval) is safe since the original PR (#18337) has not been released yet.Risk Level
none
Documentation Update
none
Contributor's checklist