[
https://issues.apache.org/jira/browse/FLINK-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16211139#comment-16211139
]
Ted Yu edited comment on FLINK-5486 at 11/16/17 3:49 AM:
---------------------------------------------------------
The reason for additional synchronization is in the description.
This was discovered during code review.
was (Author: [email protected]):
The reason for additional synchronization is in description.
This was discovered during code review.
> Lack of synchronization in BucketingSink#handleRestoredBucketState()
> --------------------------------------------------------------------
>
> Key: FLINK-5486
> URL: https://issues.apache.org/jira/browse/FLINK-5486
> Project: Flink
> Issue Type: Bug
> Components: Streaming Connectors
> Reporter: Ted Yu
> Assignee: mingleizhang
> Fix For: 1.3.3
>
>
> Here is related code:
> {code}
>
> handlePendingFilesForPreviousCheckpoints(bucketState.pendingFilesPerCheckpoint);
> synchronized (bucketState.pendingFilesPerCheckpoint) {
> bucketState.pendingFilesPerCheckpoint.clear();
> }
> {code}
> The handlePendingFilesForPreviousCheckpoints() call should be enclosed inside
> the synchronization block. Otherwise during the processing of
> handlePendingFilesForPreviousCheckpoints(), some entries of the map may be
> cleared.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)