[ https://issues.apache.org/jira/browse/KAFKA-12615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
HaiyuanZhao resolved KAFKA-12615. --------------------------------- Resolution: Fixed > 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: clients > Reporter: HaiyuanZhao > Assignee: HaiyuanZhao > Priority: Minor > > According to my understanding, the second clearCompletedSends which is > highlighted as followed should be clearCompletedReceives > /** > * 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 clearCompletedSends() and *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. > */ -- This message was sent by Atlassian Jira (v8.3.4#803005)