zhuanshenbsj1 commented on code in PR #12279:
URL: https://github.com/apache/hudi/pull/12279#discussion_r1857741031
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/versioning/v2/ActiveTimelineV2.java:
##########
@@ -522,8 +520,10 @@ protected void transitionStateToComplete(boolean
shouldLock, HoodieInstant fromI
"Could not rename " + fromInstantPath + " to " + toInstantPath);
}
} else {
+ // Ensures old state exists in timeline
ValidationUtils.checkArgument(
-
metaClient.getStorage().exists(getInstantFileNamePath(fromInstantFileName)));
+
metaClient.getStorage().exists(getInstantFileNamePath(fromInstantFileName)),
+ "Metadata file " + getInstantFileNamePath(fromInstantFileName) + "
does not exist when transition state.");
Review Comment:
Revert other lines.
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/versioning/v2/ActiveTimelineV2.java:
##########
@@ -522,8 +520,10 @@ protected void transitionStateToComplete(boolean
shouldLock, HoodieInstant fromI
"Could not rename " + fromInstantPath + " to " + toInstantPath);
}
} else {
+ // Ensures old state exists in timeline
ValidationUtils.checkArgument(
-
metaClient.getStorage().exists(getInstantFileNamePath(fromInstantFileName)));
+
metaClient.getStorage().exists(getInstantFileNamePath(fromInstantFileName)),
+ "Metadata file " + getInstantFileNamePath(fromInstantFileName) + "
does not exist when transition state.");
Review Comment:
Revert other lines.
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/versioning/v2/ActiveTimelineV2.java:
##########
@@ -522,8 +520,10 @@ protected void transitionStateToComplete(boolean
shouldLock, HoodieInstant fromI
"Could not rename " + fromInstantPath + " to " + toInstantPath);
}
} else {
+ // Ensures old state exists in timeline
ValidationUtils.checkArgument(
-
metaClient.getStorage().exists(getInstantFileNamePath(fromInstantFileName)));
+
metaClient.getStorage().exists(getInstantFileNamePath(fromInstantFileName)),
+ "Metadata file " + getInstantFileNamePath(fromInstantFileName) + "
does not exist when transition state.");
Review Comment:
> It looks like only this line needs a fix.
Revert other lines.
--
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]