You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "huxihx (JIRA)" <ji...@apache.org> on 2017/12/12 00:27:03 UTC

[jira] [Resolved] (KAFKA-6341) 'networkThreadTimeNanos' in KafkaChannel is not thread safe

     [ https://issues.apache.org/jira/browse/KAFKA-6341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

huxihx resolved KAFKA-6341.
---------------------------
    Resolution: Not A Bug

> 'networkThreadTimeNanos' in KafkaChannel is not thread safe
> -----------------------------------------------------------
>
>                 Key: KAFKA-6341
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6341
>             Project: Kafka
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 1.0.0
>            Reporter: huxihx
>
> `networkThreadTimeNanos` in KafkaChannel is of primitive long type which is not thread safe. Multiple Processor threads could access(read and write) this variable at the same time. Since JVM spec does not guarantee of the atomic 64-bit operations against long/double types, it's safer to employ AtomicLong instead of the naive long type.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)