[
https://issues.apache.org/jira/browse/FLINK-7585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chesnay Schepler closed FLINK-7585.
-----------------------------------
Resolution: Not A Problem
The SimpleCounter is not thread-safe by design, providing a low overhead
Counter that can be used in performance critical paths (i.e per-record paths).
Thread-safety is generally not required for use-cases in Flink as they are
generally only accessible to a single thread. If some part requires a
thread-safe counter they can add a thread-safe implementation and use it when
necessary.
> 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)