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

[jira] [Commented] (KAFKA-10029) Selector.completedReceives should not be modified when channel is closed

    [ https://issues.apache.org/jira/browse/KAFKA-10029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17113165#comment-17113165 ] 

Ismael Juma commented on KAFKA-10029:
-------------------------------------

Good catch. Is this a recent regression?

> Selector.completedReceives should not be modified when channel is closed
> ------------------------------------------------------------------------
>
>                 Key: KAFKA-10029
>                 URL: https://issues.apache.org/jira/browse/KAFKA-10029
>             Project: Kafka
>          Issue Type: Bug
>          Components: network
>    Affects Versions: 2.5.0
>            Reporter: Rajini Sivaram
>            Assignee: Rajini Sivaram
>            Priority: Major
>             Fix For: 2.6.0, 2.5.1
>
>
> Selector.completedReceives are processed using `forEach` by SocketServer and NetworkClient when processing receives from a poll. Since we may close channels while processing receives, changes to the map while closing channels can result in ConcurrentModificationException. We clear the entire map after each poll anyway, so we don't need to remove channel from the map while closing channels.



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