flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request #2156: [FLINK-4113] [runtime] Always copy first value in ...
Date Mon, 27 Jun 2016 11:22:40 GMT
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?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message