flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piotr Nowojski (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (FLINK-7936) Lack of synchronization w.r.t. taskManagers in MetricStore#add()
Date Tue, 31 Oct 2017 09:37:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-7936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16226511#comment-16226511
] 

Piotr Nowojski edited comment on FLINK-7936 at 10/31/17 9:36 AM:
-----------------------------------------------------------------

{{computIfAbsent}} was not used before my refactor, so I guess this issue is only about the
code after the refactor. However {{MetricStore#add()}} is only used internally and additionally
(because of historical reasons) in tests. Internal usage is protected by lock on {{MetricStore.this}}
in {{MetricStore#addAll()}}. Thus [~tedyu] I do not see where is this bug? 


was (Author: pnowojski):
{{computIfAbsent}} was not used before my refactor, so I guess this issue is only about the
code after the refactor. However {{MetricStore#add()}} is only used internally and additionally
(because of historical reasons) in tests. Internal usage is protected by lock on {{MetricStore.this}}
in {{MetricStore#addAll()}}. Thus [~tedyu] I do not see where the bug is? 

> Lack of synchronization w.r.t. taskManagers in MetricStore#add()
> ----------------------------------------------------------------
>
>                 Key: FLINK-7936
>                 URL: https://issues.apache.org/jira/browse/FLINK-7936
>             Project: Flink
>          Issue Type: Bug
>          Components: Metrics
>            Reporter: Ted Yu
>            Priority: Minor
>
> {code}
>           String tmID = ((QueryScopeInfo.TaskManagerQueryScopeInfo) info).taskManagerID;
>           tm = taskManagers.computeIfAbsent(tmID, k -> new TaskManagerMetricStore());
> {code}
> In other places, access to taskManagers is protected by lock on MetricStore.this



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

Mime
View raw message