flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chesnay Schepler (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (FLINK-7585) SimpleCounter not thread safe
Date Tue, 05 Sep 2017 18:01:00 GMT

     [ 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)

Mime
View raw message