Xoln commented on code in PR #9982:
URL: https://github.com/apache/hudi/pull/9982#discussion_r1384383072
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieDefaultTimeline.java:
##########
@@ -439,7 +439,7 @@ public boolean containsInstant(String ts) {
// Check for older timestamp which have sec granularity and an extension
of DEFAULT_MILLIS_EXT may have been added via Timeline operations
if (ts.length() ==
HoodieInstantTimeGenerator.MILLIS_INSTANT_TIMESTAMP_FORMAT_LENGTH &&
ts.endsWith(HoodieInstantTimeGenerator.DEFAULT_MILLIS_EXT)) {
final String actualOlderFormatTs = ts.substring(0, ts.length() -
HoodieInstantTimeGenerator.DEFAULT_MILLIS_EXT.length());
- return containsOrBeforeTimelineStarts(actualOlderFormatTs);
+ return containsInstant(actualOlderFormatTs);
Review Comment:
> I think you are correct, this is a compatibility fix, if an instant is
archived, the inflight timeline would deem it as included which is not as
expected. Can you check that the test `TestHoodieIndex.testCheckIfValidCommit`
which is introduced together with the fix still works?
`TestHoodieIndex.testCheckIfValidCommit` apply
`HoodieIndexUtils.checkIfValidCommit` which include
containsOrBeforeTimelineStarts but not containsInstant. I new a inflight
instant check with containsInstant in unit test and unit test is passed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]