[
https://issues.apache.org/jira/browse/FLINK-5855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15980664#comment-15980664
]
mingleizhang edited comment on FLINK-5855 at 4/24/17 2:57 AM:
--------------------------------------------------------------
Yep. That is right. So, follow your suggestion. I would write the code snippet
like Correct ?{code}
synchronized (restoredState.pendingFilesPerCheckpoint) {
restoredState.pendingFilesPerCheckpoint.clear();
}
handlePendingFilesForPreviousCheckpoints(restoredState.pendingFilesPerCheckpoint);
{code}
was (Author: mingleizhang):
Yep. That is right. So, follow your suggestion. I would write the code snippet
like Correct ?{code}.
synchronized (restoredState.pendingFilesPerCheckpoint) {
restoredState.pendingFilesPerCheckpoint.clear();
}
handlePendingFilesForPreviousCheckpoints(restoredState.pendingFilesPerCheckpoint);
{code}
> 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
> 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)