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

mingleizhang edited comment on FLINK-6362 at 4/28/17 12:00 PM:
---------------------------------------------------------------

Hi, [~tedyu] Thanks for this jira. But I would ask this line of code 
{{registeredStates.get(state.getRegistrationKey());}} seems a {{Read}} 
operation here. Why we should add protected by lock for this ? I have been not 
understood.


was (Author: mingleizhang):
Hi, [~tedyu] Thanks for this jira. But I would ask this line of code 
{{registeredStates.get(state.getRegistrationKey());}} seems a {{Read}} 
operation here. Why we should add protected by lock for this ? I dont know 
understand.

> Unprotected access to registeredStates in 
> SharedStateRegistry#getReferenceCount
> -------------------------------------------------------------------------------
>
>                 Key: FLINK-6362
>                 URL: https://issues.apache.org/jira/browse/FLINK-6362
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Ted Yu
>
> Here is related code:
> {code}
>   public int getReferenceCount(SharedStateHandle state) {
>     if (state == null) {
>       return 0;
>     }
>     SharedStateRegistry.SharedStateEntry entry =
>       registeredStates.get(state.getRegistrationKey());
> {code}
> Access should be protected by holding lock on registeredStates



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to