hudi icon indicating copy to clipboard operation
hudi copied to clipboard

[HUDI-3644] hoodie log scan bug cause data duplication bugfix

Open sekaiga opened this issue 2 years ago • 5 comments

Tips

  • Thank you very much for contributing to Apache Hudi.
  • Please review https://hudi.apache.org/contribute/how-to-contribute before opening a pull request.

What is the purpose of the pull request

(For example: This pull request adds quick-start document.)

Brief change log

(for example:)

  • Modify AnnotationLocation checkstyle rule in checkstyle.xml

Verify this pull request

(Please pick either of the following options)

This pull request is a trivial rework / code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end.
  • Added HoodieClientWriteTest to verify the change.
  • Manually verified the change by running a job locally.

Committer checklist

  • [ ] Has a corresponding JIRA in PR title & commit

  • [ ] Commit message is descriptive of the change

  • [ ] CI is green

  • [ ] Necessary doc changes done or have another open PR

  • [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

sekaiga avatar Mar 16 '22 12:03 sekaiga

@alexeykudinkin : Can you review this PR.

nsivabalan avatar Mar 16 '22 21:03 nsivabalan

@sekaiga can you please fill out the description properly? Is this PR still WIP?

alexeykudinkin avatar Mar 17 '22 03:03 alexeykudinkin

@hudi-bot run azure

XuQianJin-Stars avatar Jun 26 '22 01:06 XuQianJin-Stars

CI report:

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

hudi-bot avatar Jun 26 '22 01:06 hudi-bot

@sekaiga thanks for the contribution, can we write a test case here if it is possible ?

danny0405 avatar Jun 27 '22 04:06 danny0405

im explained in jira :https://issues.apache.org/jira/browse/HUDI-3644

when log file block append sucess. And deltacommit rollback. And this instance time is before activeTimeline starts. This log file block will be merged, cause data duplication.

So the situation is: there is a deltacommit and a rollback commit, then archive happened and deltacommit archived. As @yihua mentioned ROLLBACK_PREVIOUS_BLOCK is to prevent merging invalid delta log data. So will proceed to close this. @sekaiga please let us know if you have a way to produce the issue.

xushiyan avatar Sep 28 '22 08:09 xushiyan