CrynetLogistics commented on a change in pull request #18651: URL: https://github.com/apache/flink/pull/18651#discussion_r814874120
########## File path: flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java ########## @@ -465,7 +489,7 @@ private void addEntryToBuffer(RequestEntryT entry, boolean insertAtHead) { * <p>To this end, all in-flight requests need to completed before proceeding with the commit. */ @Override - public void flush(boolean flush) { + public void flush(boolean flush) throws InterruptedException { while (inFlightRequestsCount > 0 || (bufferedRequestEntries.size() > 0 && flush)) { mailboxExecutor.tryYield(); Review comment: On small difference I might suggest here is to have the tryYield line replaced with ``` while(inFlightRequestsCount>0){ mailboxExecutor.yield(); } ``` Only because it is possible for the code to reach here with `inFlightRequestCount=0`. Then we'd be in a real spot of bother ;) -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org