Github user tzulitai commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6040#discussion_r189029077
  
    --- Diff: 
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java
 ---
    @@ -507,7 +507,7 @@ private void updateMinPunctuatedWatermark(Watermark 
nextWatermark) {
                        SerializedValue<AssignerWithPunctuatedWatermarks<T>> 
watermarksPunctuated,
                        ClassLoader userCodeClassLoader) throws IOException, 
ClassNotFoundException {
     
    -           List<KafkaTopicPartitionState<KPH>> partitionStates = new 
LinkedList<>();
    +           List<KafkaTopicPartitionState<KPH>> partitionStates = new 
CopyOnWriteArrayList<>();
    --- End diff --
    
    Would be nice to have a comment on why we need to use a 
`CopyOnWriteArrayList`


---

Reply via email to