[ https://issues.apache.org/jira/browse/FLINK-5855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15981456#comment-15981456 ]
ASF GitHub Bot commented on FLINK-5855: --------------------------------------- Github user kl0u commented on the issue: https://github.com/apache/flink/pull/3758 Hi @zhangminglei, thanks for looking into this! I tend to agree with @tillrohrmann that there is not need for locking there, as there is no sharing of the data-structure between different threads. The same holds for the lock at line 726. So these 2 `synchronized()` clauses could go away. I will have a more thorough look on the whole locking scheme in the class in the following days. But for now I think that this PR could be closed and the JIRA could be updated. What do you think? > Unprotected access to pendingFilesPerCheckpoint in BucketingSink > ---------------------------------------------------------------- > > Key: FLINK-5855 > URL: https://issues.apache.org/jira/browse/FLINK-5855 > Project: Flink > Issue Type: Bug > Components: Streaming Connectors > Reporter: Ted Yu > Assignee: mingleizhang > Priority: Minor > > {code} > handlePendingFilesForPreviousCheckpoints(restoredState.pendingFilesPerCheckpoint); > synchronized (restoredState.pendingFilesPerCheckpoint) { > restoredState.pendingFilesPerCheckpoint.clear(); > {code} > Lock on pendingFilesPerCheckpoint should be obtained prior to the call to > handlePendingFilesForPreviousCheckpoints(). -- This message was sent by Atlassian JIRA (v6.3.15#6346)