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



##########
File path: 
flink-tests/src/test/java/org/apache/flink/test/checkpointing/ApproximateLocalRecoveryDownstreamITCase.java
##########
@@ -0,0 +1,274 @@
+/*
+ * 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.test.checkpointing;
+
+import org.apache.flink.api.common.functions.RichMapFunction;
+import org.apache.flink.api.common.restartstrategy.RestartStrategies;
+import org.apache.flink.api.java.tuple.Tuple4;
+import org.apache.flink.configuration.AkkaOptions;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.configuration.HeartbeatManagerOptions;
+import org.apache.flink.configuration.HighAvailabilityOptions;
+import org.apache.flink.configuration.JobManagerOptions;
+import org.apache.flink.configuration.MemorySize;
+import org.apache.flink.configuration.TaskManagerOptions;
+import org.apache.flink.runtime.state.KeyGroupRangeAssignment;
+import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
+import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
+import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
+import 
org.apache.flink.streaming.api.functions.source.RichParallelSourceFunction;
+import org.apache.flink.test.util.MiniClusterWithClientResource;
+import org.apache.flink.test.util.SuccessException;
+
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.BitSet;
+
+import static org.apache.flink.test.util.TestUtils.tryExecute;
+
+/** Use RemoteInputChannel. Only for Upstream Reconnection. **/
+
+public class ApproximateLocalRecoveryDownstreamITCase {
+       private static MiniClusterWithClientResource cluster;
+       private static final int BUFFER_SIZE = 4096;
+
+       @Before
+       public void setup() throws Exception {
+               Configuration config = new Configuration();
+               config.setString(JobManagerOptions.SCHEDULING_STRATEGY, 
"legacy");

Review comment:
       Yes, "region" strategy is not working with Approximate local recovery 
for several reasons:
   
   1. I had a very simple version of restart individual task failover strategy 
[here](https://github.com/apache/flink/pull/13501/commits/d25c6a706bd0267ae47cf5d0f82a5049ea83ce54#diff-b5633e55e96a81704ebeca16c513a06d1be22bffd51938f25deb7a1b9c44e5cf).
 In this case, only the failed task restarts. The region scheduling does not 
work due to the check `PipelinedRegionSchedulingStrategy#maybeScheduleRegion` 
-- `checkState(areRegionVerticesAllInCreatedState(region)`
   
   2. After switching to RestartPipelinedRegionFailoverStrategy strategy, it 
fails during the initialization stage:
   `PipelinedRegionSchedulingStrategy#init() ` --- 
`checkState(partition.getResultType().isBlocking());`. Since the regional 
failover is going be temporally used, I haven't digged into details and it 
seems the scheduling strategy is depending on some assumption that the result 
partition has to be a blocking type.
   
   I will probably need to work on this a bit more to make the pipelined region 
scheduler compatible with approximate local recovery. 
   
   I probably need to enforce the scheduling strategy in this case?




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