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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/cluster/ClusteringPlanActionExecutor.java:
##########
@@ -63,6 +63,7 @@ protected Option<HoodieClusteringPlan> createClusteringPlan() 
{
     int commitsSinceLastClustering = 
table.getActiveTimeline().getCommitsTimeline().filterCompletedInstants()
         
.findInstantsAfter(lastClusteringInstant.map(HoodieInstant::getTimestamp).orElse("0"),
 Integer.MAX_VALUE)
         .countInstants();
+
     if (config.inlineClusteringEnabled() && 
config.getInlineClusterMaxCommits() > commitsSinceLastClustering) {

Review Comment:
   Yes, the fix makes sense to me too.
   
   >but one thing which I am finding it hard to comprehend
   
   Flink writer schedules a clustering plan on each successful regular commit 
and there is a async pipeline that executes the clustering continuously, this 
patch can solve the problem that the clustering plan schedules too frequently 
if there is pending clustering.
   
   So, +1 from my side.



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