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/05/11 07:48:04 UTC
[jira] [Comment Edited] (FLINK-6381) Unnecessary synchronizing
object in BucketingSink
[ https://issues.apache.org/jira/browse/FLINK-6381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16006033#comment-16006033 ]
mingleizhang edited comment on FLINK-6381 at 5/11/17 7:47 AM:
--------------------------------------------------------------
[~kkl0u] Thanks. I guess sometimes it is a tricky problem when refer to {{synchoronize}} which objects should own it until it trigger a concurrency issue. What do you think of this ?
was (Author: mingleizhang):
[~kkl0u] Thanks. I guess sometimes it is a tricky problem when refer to {{synchoronize}} which objects should own it until it trigger a concurrency problem. What do you think of this ?
> 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, as follows. {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 ?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)