Skip to content

fix(core): gate the timeline path configs on the table version - #19566

Draft
yihua wants to merge 1 commit into
apache:masterfrom
yihua:fix-v6-timeline-config-gate
Draft

fix(core): gate the timeline path configs on the table version#19566
yihua wants to merge 1 commit into
apache:masterfrom
yihua:fix-v6-timeline-config-gate

Conversation

@yihua

@yihua yihua commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Describe the issue this Pull Request addresses

Closes #19562

Summary and Changelog

hoodie.timeline.path and hoodie.timeline.history.path describe the timeline layout version 2 folders, introduced with table version 8. A table below that version keeps its timeline directly under .hoodie and resolves its archived timeline through hoodie.archivelog.folder, so neither config has meaning there.

Neither declared a sinceVersion, and HoodieTableConfig.dropInvalidConfigs() only strips a config that declares one, so both were persisted into the hoodie.properties of tables that do not use the layout they describe. RECORD_MERGE_MODE declares .sinceVersion("1.0.0") and is correctly dropped from a version 6 table, which is the behaviour these two were missing.

Changes:

  • Declare sinceVersion("1.0.0") on TIMELINE_PATH and TIMELINE_HISTORY_PATH so the existing gate drops them below table version 8.
  • Add TestHoodieTableConfig coverage across table versions 6, 7, 8 and 9, with literal per-version expectations, also asserting that ARCHIVELOG_FOLDER is retained at every version.

hoodie.table.format was considered alongside these and deliberately left alone. Its introducing version is not the version at which it becomes meaningful: the table format SPI is orthogonal to the table version, nothing in the codebase gates a custom format on table version 9, and no upgrade handler restores the config. Gating it on sinceVersion would silently and permanently discard a custom format on any table below version 9, so excluding that config needs a different mechanism.

Impact

Tables created below version 8 no longer carry the two timeline layout version 2 configs in their properties file.

No read path changes. Every consumer resolves these through getStringOrDefault, and the only provider that reads them, TimelinePathProviderV2, is selected exclusively at layout version 2 where the configs are retained. TimelinePathProviderV1 reads neither. Resolved timeline and archive paths were verified unchanged at table versions 6, 7, 8 and 9.

Existing tables are not modified; the gate applies when properties are written. Upgrade is unaffected, since SevenToEightUpgradeHandler re-adds TIMELINE_PATH through HoodieTableConfig.update(), which does not run the gate.

One cosmetic inconsistency remains: a table upgraded from 6 or 7 to 8 will not carry hoodie.timeline.history.path, because that handler adds hoodie.timeline.path but not its sibling. Both resolve to the same default either way.

No public API change.

Risk Level

low

Confined to which keys are written into hoodie.properties. Verified that no consumer reads either config through a null-returning accessor, and that resolved paths are identical before and after across four table versions. Reverting the change fails the added test at versions 6 and 7.

Documentation Update

none

No config is added or removed and no default value changes; this records the version at which two existing configs were introduced.

Contributor's checklist

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

hoodie.timeline.path and hoodie.timeline.history.path describe the timeline
layout version 2 folders, which a table below version 8 does not have. Neither
declared a since version, and dropInvalidConfigs only strips configs that
declare one, so both were persisted into the hoodie.properties of tables whose
timeline lives directly under .hoodie.

Declare their introducing version so they are dropped below table version 8.
@github-actions github-actions Bot added the size:S PR with lines of changes in (10, 100] label Aug 8, 2026
@codecov-commenter

codecov-commenter commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.84%. Comparing base (65cf7e8) to head (4816728).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #19566   +/-   ##
=========================================
  Coverage     76.84%   76.84%           
+ Complexity    32379    32378    -1     
=========================================
  Files          2522     2522           
  Lines        139106   139108    +2     
  Branches      16713    16713           
=========================================
+ Hits         106892   106895    +3     
+ Misses        24621    24617    -4     
- Partials       7593     7596    +3     
Components Coverage Δ
hudi-common 83.26% <100.00%> (-0.01%) ⬇️
hudi-client 81.98% <ø> (-0.01%) ⬇️
hudi-flink 84.70% <ø> (ø)
hudi-spark-datasource 70.59% <ø> (-0.01%) ⬇️
hudi-utilities 73.66% <ø> (+0.03%) ⬆️
hudi-cli 15.32% <ø> (ø)
hudi-hadoop 63.49% <ø> (-0.02%) ⬇️
hudi-sync 75.11% <ø> (ø)
hudi-io 79.46% <ø> (ø)
hudi-timeline-service 83.74% <ø> (+0.29%) ⬆️
hudi-cloud 64.06% <ø> (ø)
hudi-kafka-connect 53.20% <ø> (ø)
Flag Coverage Δ
common-and-other-modules 50.14% <100.00%> (+<0.01%) ⬆️
flink-integration-tests 48.95% <100.00%> (+<0.01%) ⬆️
hadoop-mr-java-client 43.73% <100.00%> (+0.01%) ⬆️
integration-tests 13.57% <100.00%> (+<0.01%) ⬆️
spark-client-hadoop-common 49.63% <100.00%> (+<0.01%) ⬆️
spark-java-tests 51.58% <100.00%> (+<0.01%) ⬆️
spark-scala-tests 45.99% <100.00%> (+0.01%) ⬆️
utilities 36.58% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...rg/apache/hudi/common/table/HoodieTableConfig.java 94.62% <100.00%> (+0.01%) ⬆️

... and 12 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hudi-bot

hudi-bot commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

CI report:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S PR with lines of changes in (10, 100]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Timeline layout v2 path configs are persisted into hoodie.properties of tables below version 8

3 participants