Skip to content

[HUDI-8537] Alter table operation no need to do rollback for failed writes#12277

Merged
danny0405 merged 1 commit intoapache:masterfrom
zhuanshenbsj1:HUDI-8537
Dec 12, 2024
Merged

[HUDI-8537] Alter table operation no need to do rollback for failed writes#12277
danny0405 merged 1 commit intoapache:masterfrom
zhuanshenbsj1:HUDI-8537

Conversation

@zhuanshenbsj1
Copy link
Contributor

Change Logs

When executing an alter-table- command, it is unnecessary to perform a clean operation.
This can mistakenly delete the regular files of the Flink stream-write task.

Impact

Describe any public API or user-facing feature change or any performance impact.

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

If medium or high, explain what verification was done to mitigate the risks.

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

@github-actions github-actions bot added the size:S PR with lines of changes in (10, 100] label Nov 18, 2024
val commitActionType = CommitUtils.getCommitActionType(WriteOperationType.ALTER_SCHEMA, metaClient.getTableType)
val instantTime = client.createNewInstantTime()
client.startCommitWithTime(instantTime, commitActionType)
client.startAlterTableWithTime(instantTime, commitActionType)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to introduce new APIs in base write client, just use startCommit should be fine. And it's not for clean but for rollback of failed writes.

Usually we have concurrent modifications to one table tween Flink pipeline and this alter table job, one solution is to config the rollback of failed writes as lazy, but fix here to remove the rollback should also be feasible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to introduce new APIs in base write client, just use startCommit should be fine. And it's not for clean but for rollback of failed writes.

Usually we have concurrent modifications to one table tween Flink pipeline and this alter table job, one solution is to config the rollback of failed writes as lazy, but fix here to remove the rollback should also be feasible.

image

Alter table will involve rollback, clean, and archive, modify the paras will reduce the intrusiveness.

@danny0405 danny0405 changed the title [HUDI-8537] Alter table operation no need to do clean [HUDI-8537] Alter table operation no need to do rollback for failed writes Nov 18, 2024
@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 Nov 26, 2024
@hudi-bot
Copy link
Collaborator

CI report:

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

@danny0405 danny0405 merged commit f7c9402 into apache:master Dec 12, 2024
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