flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Gilles <romain.gil...@gmail.com>
Subject Documentation issue maybe
Date Wed, 06 Nov 2019 16:11:58 GMT
Hi all,
I think the code example in following section has a thread safety issue:
https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/stream/testing.html#junit-rule-miniclusterwithclientresource

The class CollectSink is not thread safe as only the write to the values
collection are synchronized but not the read:
CollectSink.values.containsAll(...). Maybe if you use
a CopyOnWriteArrayList instead of an ArrayList and remove the synchronized
key work it should be ok.

Romain

Mime
View raw message