-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fixed delete record will always be chosen during merging,regardless of the ordering value #17668
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
fixed delete record will always be chosen during merging,regardless of the ordering value #17668
Conversation
…ese is a record marked as delete record by _hoodie_is_deleted=true,the delete record will always be chosen during merging,regardless of the ordering value.
…om/cbg-wx/hudi into feature_0_14_1_delete_record_merge
|
|
||
| Comparable curOrderingVal = oldRecord.getOrderingValue(this.readerSchema, this.hoodieTableMetaClient.getTableConfig().getProps()); | ||
| Comparable deleteOrderingVal = deleteRecord.getOrderingValue(); | ||
| if (curOrderingVal instanceof Utf8){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The payload classes are deprecated now (https://hudi.apache.org/releases/release-1.1.0#deprecation-of-hoodierecordpayload) and the old log record scanner is going to be removed. The new reader path with merge modes can handle the event time-based merging correctly. @cbg-wx could you check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yihua this is a PR for 0.x-branch, should be a critical fix though.
|
cc @cshuo for reviewing this PR. |
cshuo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hudi-common/src/main/java/org/apache/hudi/common/model/EventTimeAvroPayload.java
Outdated
Show resolved
Hide resolved
hudi-common/src/main/java/org/apache/hudi/common/model/EventTimeAvroPayload.java
Outdated
Show resolved
Hide resolved
hudi-common/src/main/java/org/apache/hudi/common/model/EventTimeAvroPayload.java
Outdated
Show resolved
Hide resolved
hudi-common/src/main/java/org/apache/hudi/common/model/EventTimeAvroPayload.java
Outdated
Show resolved
Hide resolved
hudi-common/src/main/java/org/apache/hudi/common/model/EventTimeAvroPayload.java
Outdated
Show resolved
Hide resolved
...-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/table/ITTestHoodieDataSource.java
Outdated
Show resolved
Hide resolved
hudi-common/src/main/java/org/apache/hudi/common/model/DefaultHoodieRecordPayload.java
Show resolved
Hide resolved
hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieMergedLogRecordScanner.java
Outdated
Show resolved
Hide resolved
hudi-common/src/main/java/org/apache/hudi/common/util/OrderingValueUtils.java
Show resolved
Hide resolved
hudi-common/src/main/java/org/apache/hudi/common/util/OrderingValueUtils.java
Show resolved
Hide resolved
...-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/table/ITTestHoodieDataSource.java
Outdated
Show resolved
Hide resolved
|
hi @cbg-wx, I've fixed some problems in the pr, could you apply the patch and push again. btw, plz use |
Describe the issue this Pull Request addresses
Summary and Changelog
This change involve the hudi-common module below method:
Impact
Risk Level
The logic that is not deleting records needs to be checked.
Documentation Update
none
Contributor's checklist