apache / hudi

Upserts, Deletes And Incremental Processing on Big Data.
https://hudi.apache.org/
Apache License 2.0
5.45k stars 2.43k forks source link

[HUDI-8337] Fixing failure handling with HoodieMetadataTableValidator #12247

Closed linliu-code closed 1 day ago

linliu-code commented 1 week ago

Change Logs

Looks like we were not surfacing all errors/failures to the caller. So, fixing all such cases in this patch. Added tests w/ both ignoreFailed = false and true and validated the cases.

Cases covered:

Partition mis-match: when ignoreFailed = true, throws HoodieValidationException to caller. when ignoreFailed = false, validator execution may not fail, but caller can get exception via hasValidationFailure() and validator.getThrowables().get(0) File slice mis-match w/ log files: when ignoreFailed = true, throws HoodieValidationException to caller. when ignoreFailed = false, validator execution may not fail, but caller can get exception via hasValidationFailure() and validator.getThrowables().get(0) RLI mis-match (file slices match, but RLI mis-matches): when ignoreFailed = true, throws HoodieValidationException to caller. when ignoreFailed = false, validator execution may not fail, but caller can get exception via hasValidationFailure() and validator.getThrowables().get(0)

Impact

Robust MDT validation.

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".

Contributor's checklist

hudi-bot commented 1 day ago

CI report:

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