[ https://issues.apache.org/jira/browse/FLINK-2826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14967502#comment-14967502 ]
Stephan Ewen commented on FLINK-2826: ------------------------------------- True, this can lead to NullPointers in corner cases. How about: (1) Change the {{synchronized(this)}} to {{synchronized(references)}} ? This should cover it, if I see it correctly. (2) Also the condition that waits for materialization should exit if the materialization fails and gets disposed, meaning the following should change: {{while (!this.materialized)}} --> {{while (!this.materialized && !disposed)}}. > transformed is modified in > BroadcastVariableMaterialization#decrementReferenceInternal without proper > locking > ------------------------------------------------------------------------------------------------------------- > > Key: FLINK-2826 > URL: https://issues.apache.org/jira/browse/FLINK-2826 > Project: Flink > Issue Type: Bug > Reporter: Ted Yu > > Here is related code: > {code} > if (references.isEmpty()) { > disposed = true; > data = null; > transformed = null; > {code} > Elsewhere, transformed is modified with lock on > BroadcastVariableMaterialization.this -- This message was sent by Atlassian JIRA (v6.3.4#6332)