afedulov commented on a change in pull request #18666:
URL: https://github.com/apache/flink/pull/18666#discussion_r802926405



##########
File path: 
flink-connectors/flink-connector-elasticsearch-base/src/main/java/org/apache/flink/connector/elasticsearch/sink/ElasticsearchWriter.java
##########
@@ -125,15 +124,14 @@ public void write(IN element, Context context) throws 
IOException, InterruptedEx
     }
 
     @Override
-    public List<Void> prepareCommit(boolean flush) throws IOException, 
InterruptedException {
+    public void flush(boolean endOfInput) throws IOException, 
InterruptedException {
         checkpointInProgress = true;
-        while (pendingActions != 0 && (flushOnCheckpoint || flush)) {
+        while (pendingActions != 0 && flushOnCheckpoint) {

Review comment:
       OK, I agree, that makes sense. A combination of `flushOnCheckpoint` + 
`endOfInput` could be useful for bounded sources.
   Thanks for spotting this! 




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