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

Stephan Ewen commented on FLINK-2867:
-------------------------------------

The Checkpoint/Restore and the {{invoke()}} methods are actually guaranteed to 
be exclusive by the runtime - there is outside synchronization.

> Access to pendingFilesPerCheckpoint should be synchronized
> ----------------------------------------------------------
>
>                 Key: FLINK-2867
>                 URL: https://issues.apache.org/jira/browse/FLINK-2867
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Ted Yu
>
> In RollingSink#restoreState():
> {code}
>     Set<Long> pastCheckpointIds = 
> bucketState.pendingFilesPerCheckpoint.keySet();
>     LOG.debug("Moving pending files to final location on restore.");
>     for (Long pastCheckpointId : pastCheckpointIds) {
>       // All the pending files are buckets that have been completed but are 
> waiting to be renamed
>       // to their final name
>       for (String filename : 
> bucketState.pendingFilesPerCheckpoint.get(pastCheckpointId)) {
> {code}
> Access to pendingFilesPerCheckpoint should be covered under synchronized 
> keyword.
> The other methods in this class use synchronized access.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to