prashantwason commented on code in PR #8607:
URL: https://github.com/apache/hudi/pull/8607#discussion_r1188645068
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieArchivedTimeline.java:
##########
@@ -152,9 +156,13 @@ public void loadCompactionDetailsInMemory(String
compactionInstantTime) {
public void loadCompactionDetailsInMemory(String startTs, String endTs) {
// load compactionPlan
- loadInstants(new TimeRangeFilter(startTs, endTs), true, record ->
-
record.get(ACTION_TYPE_KEY).toString().equals(HoodieTimeline.COMPACTION_ACTION)
- &&
HoodieInstant.State.INFLIGHT.toString().equals(record.get(ACTION_STATE).toString())
+ loadInstants(new TimeRangeFilter(startTs, endTs), true,
+ record -> {
+ // Older files don't have action state set.
+ Object action = record.get(ACTION_STATE);
+ return
record.get(ACTION_TYPE_KEY).toString().equals(HoodieTimeline.COMPACTION_ACTION)
+ && (action == null ||
HoodieInstant.State.INFLIGHT.toString().equals(action.toString()));
Review Comment:
old version is deprecated/fixed so dont know how to write unit tests for
them.
--
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]