curcur commented on a change in pull request #13648:
URL: https://github.com/apache/flink/pull/13648#discussion_r508234412



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/PipelinedApproximateSubpartitionView.java
##########
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.io.network.partition;
+
+import static org.apache.flink.util.Preconditions.checkState;
+
+/**
+ * View over a pipelined in-memory only subpartition allowing reconnecting.
+ */
+public class PipelinedApproximateSubpartitionView extends 
PipelinedSubpartitionView {
+
+       PipelinedApproximateSubpartitionView(PipelinedApproximateSubpartition 
parent, BufferAvailabilityListener listener) {
+               super(parent, listener);
+       }
+
+       @Override
+       public void releaseAllResources() {

Review comment:
       That's a good question, I probably should add some description somewhere 
to explain this.
   
   For view release, the `PipelinedSubpartitionView#releaseAllResources` (the 
original one) notifies its parent's parent (the result partition) that the 
corresponding subpartition has already been consumed (able to release). If all 
its subpartitions are released, the result partition is released.
   
   In `PipelinedApproximateSubpartitionView#releaseAllResources`, we only set 
the readView to null; The partition is set tracked in 
`JobMasterPartitionTrackerImpl#startTrackingPartition` . The change would be 
included in the next diff (draft PR 
https://github.com/apache/flink/pull/13677/commits/7d31593b3db7cc2a2448c69750ab0963e189c051),
 with the failover strategy change altogether.
   
   In that case, the result partition would be released in case of job exit.
   
   In task failure case, the produced partition would be released by the 
recordwriter.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to