You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apex.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/12/30 20:50:58 UTC
[jira] [Commented] (APEXCORE-504) Possible race condition in
StreamingContainerAgent.getStreamCodec()
[ https://issues.apache.org/jira/browse/APEXCORE-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15788320#comment-15788320 ]
ASF GitHub Bot commented on APEXCORE-504:
-----------------------------------------
GitHub user vrozov opened a pull request:
https://github.com/apache/apex-core/pull/438
APEXCORE-504 - Possible race condition in StreamingContainerAgent.getStreamCodec()
@PramodSSImmaneni, @tweise Please review and merge.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/vrozov/apex-core release-3.2
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/apex-core/pull/438.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 #438
----
commit e56ac78a3a19eb2b42d9a212ca0fabfa309eabc2
Author: Vlad Rozov <v....@datatorrent.com>
Date: 2016-12-30T20:48:52Z
APEXCORE-504 - Possible race condition in StreamingContainerAgent.getStreamCodec()
----
> Possible race condition in StreamingContainerAgent.getStreamCodec()
> -------------------------------------------------------------------
>
> Key: APEXCORE-504
> URL: https://issues.apache.org/jira/browse/APEXCORE-504
> Project: Apache Apex Core
> Issue Type: Bug
> Affects Versions: 3.3.0, 3.2.1, 3.4.0
> Reporter: Vlad Rozov
> Assignee: Vlad Rozov
>
> StreamingContainerAgent.getStreamCodec() may be called from multiple RPC heartbeat processing threads for the same inputPortMeta (for an input port of a partitioned operator) that leads to a race condition in the following code:
> {noformat}
> StreamCodec<?> codec = inputPortMeta.getValue(PortContext.STREAM_CODEC);
> if (codec == null) {
> // it cannot be this object that gets returned. Depending on this value is dangerous
> codec = inputPortMeta.getPortObject().getStreamCodec();
> if (codec != null) {
> // don't create codec multiple times - it will assign a new identifier
> inputPortMeta.getAttributes().put(PortContext.STREAM_CODEC, codec);
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)