nsivabalan commented on code in PR #8589: URL: https://github.com/apache/hudi/pull/8589#discussion_r1181807316
########## hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/DeltaSync.java: ########## @@ -421,8 +422,17 @@ public Pair<Option<String>, JavaRDD<WriteStatus>> syncOnce() throws IOException } } - // complete the pending clustering before writing to sink - if (cfg.retryLastPendingInlineClusteringJob && getHoodieClientConfig(this.schemaProvider).inlineClusteringEnabled()) { + // complete the pending compaction before writing to sink + if (cfg.retryLastPendingInlineCompactionJob && getHoodieClientConfig(this.schemaProvider).inlineCompactionEnabled()) { + Option<String> pendingCompactionInstant = getLastPendingCompactionInstant(allCommitsTimelineOpt); + if (pendingCompactionInstant.isPresent()) { + HoodieWriteMetadata<JavaRDD<WriteStatus>> writeMetadata = writeClient.compact(pendingCompactionInstant.get()); + writeClient.commitCompaction(pendingCompactionInstant.get(), writeMetadata.getCommitMetadata().get(), Option.empty()); + //refreshTimeline(); Review Comment: is refresh timeline not required? Its better to refresh the timeline. -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org