flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-4113) Always copy first value in ChainedAllReduceDriver
Date Mon, 27 Jun 2016 11:22:52 GMT

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

ASF GitHub Bot commented on FLINK-4113:
---------------------------------------

Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2156#discussion_r68560241
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/operators/chaining/ChainedAllReduceDriver.java
---
    @@ -89,7 +89,7 @@ public void collect(IT record) {
     		numRecordsIn.inc();
     		try {
     			if (base == null) {
    -				base = objectReuseEnabled ? record : serializer.copy(record);
    +				base = serializer.copy(record);
     			} else {
     				base = objectReuseEnabled ? reducer.reduce(base, record) : serializer.copy(reducer.reduce(base,
record));
    --- End diff --
    
    What if we return the `record` as the result of `reducer.reduce` (with `objectReuseEnabled
== true`)? That would also be problematic, right?


> Always copy first value in ChainedAllReduceDriver
> -------------------------------------------------
>
>                 Key: FLINK-4113
>                 URL: https://issues.apache.org/jira/browse/FLINK-4113
>             Project: Flink
>          Issue Type: Bug
>          Components: Local Runtime
>    Affects Versions: 1.1.0, 1.0.4
>            Reporter: Greg Hogan
>            Assignee: Greg Hogan
>            Priority: Critical
>             Fix For: 1.1.0, 1.0.4
>
>
> {{ChainedAllReduceDriver.collect}} must copy the first record even when object reuse
is enabled or {{base}} may later point to the same object as {{record}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message