Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HUDI-8881] trigger failure earlier in Flink Hudi sink #12666

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HuangZhenQiu
Copy link
Contributor

@HuangZhenQiu HuangZhenQiu commented Jan 17, 2025

Change Logs

Trigger failure when write failure is detected for flink hudi sink

Impact

The early detection of write failure will prevent checkpoint to complete before hudi commit. Thus, prevent the data loss when checkpoint is completed, but hudi can't committed due the write failure.

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

none

Documentation Update

It is an improvement of existing functionality, no user facing feature is introduced.

Contributor's checklist

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

@HuangZhenQiu HuangZhenQiu changed the title [HUDI-8881] trigger failure earlier Flink Hudi sink [HUDI-8881] trigger failure earlier in Flink Hudi sink Jan 17, 2025
@HuangZhenQiu HuangZhenQiu force-pushed the HUDI-8881-failure-handling branch from 6194d60 to d04b0f1 Compare January 17, 2025 19:15
@github-actions github-actions bot added the size:S PR with lines of changes in (10, 100] label Jan 17, 2025
@HuangZhenQiu HuangZhenQiu force-pushed the HUDI-8881-failure-handling branch 4 times, most recently from 2d91da4 to 5333ece Compare January 18, 2025 04:12
@xushiyan xushiyan requested a review from danny0405 January 20, 2025 18:34
@@ -473,6 +475,19 @@ private void handleEndInputEvent(WriteMetadataEvent event) {
}
}

private void filterWriteFailure(WriteMetadataEvent event) throws HoodieException {
Copy link

@sharath1709 sharath1709 Jan 22, 2025

Choose a reason for hiding this comment

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

Can we reuse the same logic in doCommit method as well to prevent any future logical divergence in detecting write failures?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is a good suggestion. The logical of detecting write failures is actually one single line with stream API. I feel it is overkill to create a separate function for it.

Copy link
Contributor Author

@HuangZhenQiu HuangZhenQiu Jan 22, 2025

Choose a reason for hiding this comment

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

@danny0405 Do you think we also need to log error in single event as commit time?

@HuangZhenQiu HuangZhenQiu force-pushed the HUDI-8881-failure-handling branch from 5333ece to 3112505 Compare January 23, 2025 21:07
@hudi-bot
Copy link

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.

5 participants