Github user aljoscha commented on the issue:

    https://github.com/apache/flink/pull/2110
  
    Thanks for the thorough review, @tillrohrmann!
    
    Your points are valid, maybe I'll have to change this PR but let me first 
explain my reasoning.
    
    The shallow copy is performed in the one place that all code paths have to 
go through because it is the point right before control is passed to the 
operator. Putting it in different place would mean placing it in 
`BroadcastingOutputCollector`, as you mentioned, as well as in 
https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/collector/selector/DirectedOutput.java,
 which is used when the user does a split()/select() operation 
(`DataStream.split()`). The number of places where we have to put this might 
evolve in the future.
    
    Also, putting it in `BroadcastingOutputCollector` and `DirectedOutput` 
would mean that we always do two copies per record for the common case of 
having object-copying enabled (which is the default).
    
    About the ITCase. I also don't like having that in there because we are 
approaching the 2h mark on Travis but I think in this case it's valid. This 
test really verifies that the whole system works correctly when the user uses a 
certain feature (I would also add a test for split()/select() now that I 
thought about it). 


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to