Andy Coates created KAFKA-9668:
----------------------------------
Summary: 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
`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)