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

Kostas Kloudas edited comment on FLINK-6381 at 4/25/17 4:18 PM:
----------------------------------------------------------------

Hi [~mingleizhang]! I updated the {{Type}} to improvement, as the locking just 
seems to be redundant, rather than a BUG that can cause problems. 

Thanks for working on this. I will have a look in the class in the following 
days.


was (Author: kkl0u):
Hi [[~mingleizhang]! I updated the {{Type}} to improvement, as the locking just 
seems to be redundant, rather than a BUG that can cause problems. 

Thanks for working on this. I will have a look in the class in the following 
days.

> Unnecessary synchronizing object in BucketingSink
> -------------------------------------------------
>
>                 Key: FLINK-6381
>                 URL: https://issues.apache.org/jira/browse/FLINK-6381
>             Project: Flink
>          Issue Type: Improvement
>          Components: filesystem-connector
>            Reporter: mingleizhang
>            Assignee: mingleizhang
>
> It seems that currently there are two places should not employ the 
> {{synchronized}} to describe {{pendingFilesPerCheckpoint}}, as it is only 
> restored state object for checkpoint and no sharing of the data-structure 
> between different threads. Codes in  {{BucketingSink}} are as follow. {code} 
> private void handleRestoredRollingSinkState(RollingSink.BucketState 
> restoredState) {
>      ...
>     synchronized (restoredState.pendingFilesPerCheckpoint) {
>                       restoredState.pendingFilesPerCheckpoint.clear();
>               }
>      ...
> }{code} and {code}private void handleRestoredBucketState(State<T> 
> restoredState) {       
>     ...
>     synchronized (bucketState.pendingFilesPerCheckpoint) {
>                       bucketState.pendingFilesPerCheckpoint.clear();
>               }
>  } {code}
> Hi, [~kkl0u]. Is there any other stuff shoud add here ? Would you mind have a 
> more thorough look in this class ? Thanks go out to you. I am very appreciate 
> it.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to