CrynetLogistics commented on a change in pull request #18651:
URL: https://github.com/apache/flink/pull/18651#discussion_r813746213



##########
File path: 
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java
##########
@@ -313,7 +329,14 @@ private void flushIfAble() {
      */
     private void flush() {
         while (inFlightRequestsCount >= maxInFlightRequests) {
-            mailboxExecutor.tryYield();
+            try {
+                mailboxExecutor.yield();
+            } catch (InterruptedException e) {

Review comment:
       Makes sense, it was a tough decision for me to handle it here or in the 
4 places that call `flush()`. 3 of those 4 places throw an 
`InterruptedException` executing on the mailbox thread anyway, so it has the 
same effect. So I will move this block to the fourth and final place the 
`flush(boolean flush)` method.




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