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


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteOperatorCoordinator.java:
##########
@@ -522,7 +522,10 @@ private boolean commitInstant(String instant, long 
checkpointId) {
         .flatMap(Collection::stream)
         .collect(Collectors.toList());
 
-    if (writeResults.size() == 0) {
+    // Control whether we can commit on empty batch to start a new instant 
after each checkpoint
+    boolean allowCommitOnEmptyBatch = 
conf.get(FlinkOptions.WRITE_ALLOW_COMMIT_ON_EMPTY_BATCH);
+
+    if (writeResults.size() == 0 && !allowCommitOnEmptyBatch) {

Review Comment:
   That's should be fine, can you eliminate the flink option to reuse 
`hoodie.allow.empty.commit`? In `OptionsResolver`, you can add a tool method 
for resolving this option key in convenience.



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