danny0405 commented on code in PR #10435:
URL: https://github.com/apache/hudi/pull/10435#discussion_r1439111567


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieTableServiceClient.java:
##########
@@ -1016,7 +1016,7 @@ private List<String> 
getInstantsToRollbackForLazyCleanPolicy(HoodieTableMetaClie
   @Deprecated
   public boolean rollback(final String commitInstantTime, 
Option<HoodiePendingRollbackInfo> pendingRollbackInfo, boolean skipLocking) 
throws HoodieRollbackException {
     final String rollbackInstantTime = pendingRollbackInfo.map(entry -> 
entry.getRollbackInstant().getTimestamp())
-        .orElse(createNewInstantTime(!skipLocking));
+        .orElseGet(() -> createNewInstantTime(!skipLocking));
     return rollback(commitInstantTime, pendingRollbackInfo, 
rollbackInstantTime, skipLocking);

Review Comment:
   Okay, so `#orElseGet` is always preferrable than `#orElse`.



-- 
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]

Reply via email to