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

Rui Fan resolved FLINK-40524.
-----------------------------
    Fix Version/s: 2.4.0
       Resolution: Fixed

Merged to master(2.4.0) via: 9bd05c557c74c21e68faa6f5a11e47c6c513c025

> LocalInputChannel.getNextBuffer takes the recoveredBuffers monitor on every 
> buffer even when the channel never needed recovery
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-40524
>                 URL: https://issues.apache.org/jira/browse/FLINK-40524
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Runtime / Checkpointing
>            Reporter: Rui Fan
>            Assignee: Rui Fan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.4.0
>
>
> CDR added an unconditional `synchronized (recoveredBuffers)` to the 
> local-consume hot path [1], but for channels built with `needsRecovery=false` 
> (all local channels when CDR is off) `inRecovery` is always false and 
> `recoveredBuffers` always empty, so the block is dead yet still costs a 
> monitor acquire per buffer. Fix: since `needsRecovery` is final, gate the 
> recovery block on it so the steady-state path skips the monitor entirely.
> [1] 
> https://github.com/apache/flink/blob/76e774e04ff84ea305714153c5f4790fff98437c/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/LocalInputChannel.java#L566



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to