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

ASF GitHub Bot commented on KAFKA-9668:
---------------------------------------

guozhangwang commented on pull request #8233: KAFKA-9668: Iterating over 
KafkaStreams.getAllMetadata() results in ConcurrentModificationException
URL: https://github.com/apache/kafka/pull/8233
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Iterating over KafkaStreams.getAllMetadata() results in 
> ConcurrentModificationException
> ---------------------------------------------------------------------------------------
>
>                 Key: KAFKA-9668
>                 URL: https://issues.apache.org/jira/browse/KAFKA-9668
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 0.10.1.0
>            Reporter: Andy Coates
>            Assignee: Andy Coates
>            Priority: Major
>
> `KafkaStreams.getAllMetadata()` returns 
> `StreamsMetadataState.getAllMetadata()`. All the latter methods is 
> `synchronized` it returns a reference to internal mutable state.  Not only 
> does this break encapsulation, but it means any thread iterating over the 
> returned collection when the metadata gets rebuilt will encounter a 
> `ConcurrentModificationException`.



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

Reply via email to