[ 
https://issues.apache.org/jira/browse/FLINK-25792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zichen Liu updated FLINK-25792:
-------------------------------
    Description: 
h2. Bug:

Async Sink Base is too being flushed too frequently resulting in backpressure 
even when buffer is near empty

*Cause:*

During a write(), flushIfAble() is called, which checks if the number of 
buffered elements is greater than a batch size, and if so, insists that the 
sink flushes immediately, even if the number of inFlightRequests is greater 
than the maximum allowed number of inFlightRequests, resulting in a yield of 
the current mailbox thread, and hence blocks.

Notice that this can occur even if the buffer is near empty, so the blocking 
behaviour is unnecessary and undesirable, since we would like the element to be 
written to the buffer and no blocking to occur.

  was:
h2. Bug:

 


> Async Sink Base is too being flushed too frequently resulting in backpressure 
> even when buffer is near empty
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-25792
>                 URL: https://issues.apache.org/jira/browse/FLINK-25792
>             Project: Flink
>          Issue Type: New Feature
>          Components: Connectors / Kinesis
>            Reporter: Zichen Liu
>            Assignee: Ahmed Hamdy
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.15.0
>
>
> h2. Bug:
> Async Sink Base is too being flushed too frequently resulting in backpressure 
> even when buffer is near empty
> *Cause:*
> During a write(), flushIfAble() is called, which checks if the number of 
> buffered elements is greater than a batch size, and if so, insists that the 
> sink flushes immediately, even if the number of inFlightRequests is greater 
> than the maximum allowed number of inFlightRequests, resulting in a yield of 
> the current mailbox thread, and hence blocks.
> Notice that this can occur even if the buffer is near empty, so the blocking 
> behaviour is unnecessary and undesirable, since we would like the element to 
> be written to the buffer and no blocking to occur.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to