HundalTaran commented on code in PR #27631:
URL: https://github.com/apache/flink/pull/27631#discussion_r2844885079
##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java:
##########
@@ -353,7 +353,7 @@ private BasicRequestInfo createRequestInfo() {
private void flush() throws InterruptedException {
RequestInfo requestInfo = createRequestInfo();
while (rateLimitingStrategy.shouldBlock(requestInfo)) {
- mailboxExecutor.yield();
Review Comment:
It is explicitly mentioned in the Javadoc that until or unless another
command is not triggered :
/**
* This method starts running the command at the head of the mailbox and
is intended to be used
* by the mailbox thread to yield from a currently ongoing action to
another command. The method
* blocks until another command to run is available in the mailbox and
must only be called from
* the mailbox thread. Must only be called from the mailbox thread to
not violate the
* single-threaded execution model.
*
* @throws InterruptedException on interruption.
* @throws IllegalStateException if the mailbox is closed and can no
longer supply runnables for
* yielding.
* @throws FlinkRuntimeException if executed {@link
RunnableWithException} thrown an exception.
*/
--
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]