You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/01/29 05:50:39 UTC
[jira] [Commented] (FLINK-3301) Ineffective synchronization in
MessageAcknowledgingSourceBase#restoreState
[ https://issues.apache.org/jira/browse/FLINK-3301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15122955#comment-15122955 ]
ASF GitHub Bot commented on FLINK-3301:
---------------------------------------
GitHub user tedyu opened a pull request:
https://github.com/apache/flink/pull/1560
FLINK-3301 Ineffective synchronization in MessageAcknowledgingSourceBase#restoreState
This PR changes synchronization on pendingCheckpoints to this (MessageAcknowledgingSourceBase)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tedyu/flink master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/1560.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1560
----
commit 18338c7c51c3f1ada3541ee988c8028d3a87d38a
Author: tedyu <yu...@gmail.com>
Date: 2016-01-29T04:47:24Z
FLINK-3301 Ineffective synchronization in MessageAcknowledgingSourceBase#restoreState
----
> Ineffective synchronization in MessageAcknowledgingSourceBase#restoreState
> --------------------------------------------------------------------------
>
> Key: FLINK-3301
> URL: https://issues.apache.org/jira/browse/FLINK-3301
> Project: Flink
> Issue Type: Bug
> Reporter: Ted Yu
>
> Here is related code:
> {code}
> public void restoreState(SerializedCheckpointData[] state) throws Exception {
> synchronized (pendingCheckpoints) {
> pendingCheckpoints = SerializedCheckpointData.toDeque(state, idSerializer);
> {code}
> When lock is held on current pendingCheckpoints field, new reference is assigned to the same field - making the synchronization ineffective.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)