Skip to content

[HUDI-9694] Fix bug in Metadata Table restore flow where table is recreated#13691

Merged
danny0405 merged 2 commits intoapache:masterfrom
the-other-tim-brown:restore-completion-time-bug
Aug 8, 2025
Merged

[HUDI-9694] Fix bug in Metadata Table restore flow where table is recreated#13691
danny0405 merged 2 commits intoapache:masterfrom
the-other-tim-brown:restore-completion-time-bug

Conversation

@the-other-tim-brown
Copy link
Contributor

@the-other-tim-brown the-other-tim-brown commented Aug 7, 2025

Change Logs

After switching to the completion time based commit ordering in restores in this PR, the restores started to fail if the Metadata Table is restored to an instant before the last compaction on the metadata table. This is because the table is rebuilt and therefore there is no completion time for the instant.

This PR adds a test case to reproduce the issue and then adds proper handling for this case when computing the instants to roll back on the metadata table.

Impact

Fixes a bug when restore to older savepoints

Risk level (write none, low medium or high below)

Low

Documentation Update

Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none".

  • The config description must be updated if new configs are added or the default value of the configs are changed
  • Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
    ticket number here and follow the instruction to make
    changes to the website.

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@the-other-tim-brown the-other-tim-brown changed the title handle mdt restore flow where table is recreated [HUDI-9694] Fix bug in Handle Metadata Table restore flow where table is recreated Aug 7, 2025
@the-other-tim-brown the-other-tim-brown marked this pull request as ready for review August 7, 2025 13:37
@the-other-tim-brown the-other-tim-brown force-pushed the restore-completion-time-bug branch from 39e96fb to 65c9375 Compare August 7, 2025 13:41
@github-actions github-actions bot added the size:S PR with lines of changes in (10, 100] label Aug 7, 2025
@the-other-tim-brown the-other-tim-brown changed the title [HUDI-9694] Fix bug in Handle Metadata Table restore flow where table is recreated [HUDI-9694] Fix bug in Metadata Table restore flow where table is recreated Aug 7, 2025
@github-actions github-actions bot added size:M PR with lines of changes in (100, 300] and removed size:S PR with lines of changes in (10, 100] labels Aug 7, 2025
@hudi-bot
Copy link
Collaborator

hudi-bot commented Aug 7, 2025

CI report:

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

@danny0405 danny0405 merged commit 06d9e32 into apache:master Aug 8, 2025
61 checks passed
alexr17 pushed a commit to alexr17/hudi that referenced this pull request Aug 25, 2025
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.

3 participants