You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/11/06 11:48:32 UTC

[GitHub] [flink-ml] zhipeng93 commented on a change in pull request #18: [FLINK-24279] Support withBroadcast in DataStream by caching in static variables

zhipeng93 commented on a change in pull request #18:
URL: https://github.com/apache/flink-ml/pull/18#discussion_r744116336



##########
File path: flink-ml-iteration/src/main/java/org/apache/flink/iteration/datacache/nonkeyed/DataCacheWriter.java
##########
@@ -43,6 +43,10 @@
     private final List<Segment> finishSegments;
 
     private SegmentWriter currentSegment;
+    /**
+     * The segments that are newly added that has not been retrieved by getNewlyFinishedSegments().
+     */
+    private final List<Segment> newlyFinishedSegments;

Review comment:
       Hi Yun, this is a good point. But I think maintaining `newlyFinishedSegments` is better. The reason is as follows:
   
   We need to maintain a not-yet processed segment list for each input (i.e., `segmentLists[inputIndex]`), i.e., in this list we need to (1) add the newly cached segments and (2) remove the processed segments.
   
   If we are not maintaining the not-yet processed segment list and include the pending segments in  `finishSegmets` of the new writers, then we are not able to remove the processed segments.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org