You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "mingleizhang (JIRA)" <ji...@apache.org> on 2017/04/25 12:07:04 UTC
[jira] [Issue Comment Deleted] (FLINK-6381) Unnecessary
synchronizing object in BucketingSink
[ https://issues.apache.org/jira/browse/FLINK-6381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
mingleizhang updated FLINK-6381:
--------------------------------
Comment: was deleted
(was: It seems that currently there are two places should not employ the {{synchronized}} to modify {{pendingFilesPerCheckpoint}}, as it is only restored state object for checkpoint and no sharing of the data-structure between different threads. code in {{BucketingSink}} 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.)
> Unnecessary synchronizing object in BucketingSink
> -------------------------------------------------
>
> Key: FLINK-6381
> URL: https://issues.apache.org/jira/browse/FLINK-6381
> Project: Flink
> Issue Type: Bug
> Components: filesystem-connector
> Reporter: mingleizhang
>
> It seems that currently there are two places should not employ the {{synchronized}} to modify {{pendingFilesPerCheckpoint}}, as it is only restored state object for checkpoint and no sharing of the data-structure between different threads. code in {{BucketingSink}} 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)