n3nash commented on a change in pull request #1963:
URL: https://github.com/apache/hudi/pull/1963#discussion_r472687401



##########
File path: hudi-client/src/main/java/org/apache/hudi/index/hbase/HBaseIndex.java
##########
@@ -177,13 +176,11 @@ private Get generateStatement(String key) throws 
IOException {
   }
 
   private boolean checkIfValidCommit(HoodieTableMetaClient metaClient, String 
commitTs) {
-    HoodieTimeline commitTimeline = 
metaClient.getActiveTimeline().filterCompletedInstants();
+    HoodieTimeline commitTimeline = 
metaClient.getCommitsTimeline().filterCompletedInstants();

Review comment:
       Can you please change this to -> 
`metaClient.getActiveTimeline().getCommitsTimeline()`. For context, the 
getActiveTimeline() loads the timeline once and then caches it. The 
getCommitsTimeline() call will not force this, in this case it's working by 
coincidence because the metaClient passed already has the loaded timeline from 
the caller but I would want to avoid having that assumption. 
   @rmpifer 




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to