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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]