ad1happy2go commented on code in PR #9510:
URL: https://github.com/apache/hudi/pull/9510#discussion_r1309787047


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieStreamingSink.scala:
##########
@@ -318,14 +318,18 @@ class HoodieStreamingSink(sqlContext: SQLContext,
 
   private def canSkipBatch(incomingBatchId: Long, operationType: String): 
Boolean = {
     if (!DELETE_OPERATION_OPT_VAL.equals(operationType)) {
-      val identifier = 
options.getOrElse(STREAMING_CHECKPOINT_IDENTIFIER.key(), 
STREAMING_CHECKPOINT_IDENTIFIER.defaultValue())
-      // get the latest checkpoint from the commit metadata to check if the 
microbatch has already been processed or not
-      val lastCheckpoint = CommitUtils.getValidCheckpointForCurrentWriter(
-        metaClient.get.getActiveTimeline.getWriteTimeline, 
SINK_CHECKPOINT_KEY, identifier)
-      if (lastCheckpoint.isPresent) {
-        latestCommittedBatchId = lastCheckpoint.get().toLong
+      if(incomingBatchId == 0) {
+         false

Review Comment:
   Yes, I agree @yihua . Thanks. Closing this PR then without committing. 
@nsivabalan  Let me know if any concerns.



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

Reply via email to