You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "HaiyuanZhao (Jira)" <ji...@apache.org> on 2021/04/05 13:12:00 UTC

[jira] [Updated] (KAFKA-12615) Correct comments for the method Selector.clear

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

HaiyuanZhao updated KAFKA-12615:
--------------------------------
    Description: 
According to my understanding, the second clearCompletedSends should be clearCompletedReceives
{code:java}

/**
 * Clears all the results from the previous poll. This is invoked by Selector at the start of
 * a poll() when all the results from the previous poll are expected to have been handled.
 * <p>
 * SocketServer uses {@link #clearCompletedSends()} and {@link #clearCompletedSends()} to
 * clear `completedSends` and `completedReceives` as soon as they are processed to avoid
 * holding onto large request/response buffers from multiple connections longer than necessary.
 * Clients rely on Selector invoking {@link #clear()} at the start of each poll() since memory usage
 * is less critical and clearing once-per-poll provides the flexibility to process these results in
 * any order before the next poll.
 */
{code}

  was:
{code:java}

/**
 * Clears all the results from the previous poll. This is invoked by Selector at the start of
 * a poll() when all the results from the previous poll are expected to have been handled.
 * <p>
 * SocketServer uses {@link #clearCompletedSends()} and {@link #clearCompletedSends()} to
 * clear `completedSends` and `completedReceives` as soon as they are processed to avoid
 * holding onto large request/response buffers from multiple connections longer than necessary.
 * Clients rely on Selector invoking {@link #clear()} at the start of each poll() since memory usage
 * is less critical and clearing once-per-poll provides the flexibility to process these results in
 * any order before the next poll.
 */
{code}


> Correct comments for the method Selector.clear
> ----------------------------------------------
>
>                 Key: KAFKA-12615
>                 URL: https://issues.apache.org/jira/browse/KAFKA-12615
>             Project: Kafka
>          Issue Type: Improvement
>          Components: build
>            Reporter: HaiyuanZhao
>            Assignee: HaiyuanZhao
>            Priority: Minor
>
> According to my understanding, the second clearCompletedSends should be clearCompletedReceives
> {code:java}
> /**
>  * Clears all the results from the previous poll. This is invoked by Selector at the start of
>  * a poll() when all the results from the previous poll are expected to have been handled.
>  * <p>
>  * SocketServer uses {@link #clearCompletedSends()} and {@link #clearCompletedSends()} to
>  * clear `completedSends` and `completedReceives` as soon as they are processed to avoid
>  * holding onto large request/response buffers from multiple connections longer than necessary.
>  * Clients rely on Selector invoking {@link #clear()} at the start of each poll() since memory usage
>  * is less critical and clearing once-per-poll provides the flexibility to process these results in
>  * any order before the next poll.
>  */
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)