You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Hai Zhou (JIRA)" <ji...@apache.org> on 2017/09/05 15:14:00 UTC
[jira] [Commented] (FLINK-7585) SimpleCounter not thread safe
[ https://issues.apache.org/jira/browse/FLINK-7585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16153798#comment-16153798 ]
Hai Zhou commented on FLINK-7585:
---------------------------------
Hi [~Zentol],
SimpleCounter is not thread safe.
Whether we need to modify the type of *count* to LongAdder, to ensure thread safety ?
Cheers,
Hai Zhou
> SimpleCounter not thread safe
> -----------------------------
>
> Key: FLINK-7585
> URL: https://issues.apache.org/jira/browse/FLINK-7585
> Project: Flink
> Issue Type: Bug
> Components: Build System, Metrics
> Affects Versions: 1.3.2
> Reporter: Hai Zhou
> Assignee: Hai Zhou
> Fix For: 1.4.0, 1.3.3
>
>
> package org.apache.flink.metrics;
> /**
> * A simple low-overhead {@link org.apache.flink.metrics.Counter} that is not thread-safe.
> */
> public class SimpleCounter implements Counter {
> /** the current count. */
> private long count;
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)