You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Sönke Liebau (JIRA)" <ji...@apache.org> on 2018/12/05 10:13:00 UTC

[jira] [Updated] (KAFKA-7707) Some code is not necessary

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

Sönke Liebau updated KAFKA-7707:
--------------------------------
    Description: 
In the trunk branch in [BufferPool.java|https://github.com/apache/kafka/blob/578205cadd0bf64d671c6c162229c4975081a9d6/clients/src/main/java/org/apache/kafka/clients/producer/internals/BufferPool.java#L174], i think the code can clean,is not necessary,it will never execute
{code:java}
if (!(this.nonPooledAvailableMemory == 0 && this.free.isEmpty()) && !this.waiters.isEmpty())
    this.waiters.peekFirst().signal();
{code}

  was:
!image-2018-12-05-18-01-46-886.png!

in the trunk branch,i think the code can clean,is not necessary,it will never execute
{code:java}
if (!(this.nonPooledAvailableMemory == 0 && this.free.isEmpty()) && !this.waiters.isEmpty())
    this.waiters.peekFirst().signal();
{code}


> Some code is not necessary
> --------------------------
>
>                 Key: KAFKA-7707
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7707
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: huangyiming
>            Priority: Minor
>         Attachments: image-2018-12-05-18-01-46-886.png
>
>
> In the trunk branch in [BufferPool.java|https://github.com/apache/kafka/blob/578205cadd0bf64d671c6c162229c4975081a9d6/clients/src/main/java/org/apache/kafka/clients/producer/internals/BufferPool.java#L174], i think the code can clean,is not necessary,it will never execute
> {code:java}
> if (!(this.nonPooledAvailableMemory == 0 && this.free.isEmpty()) && !this.waiters.isEmpty())
>     this.waiters.peekFirst().signal();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)