You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "noorall (via GitHub)" <gi...@apache.org> on 2025/09/28 04:49:07 UTC

[PR] [FLINK-38272][runtime] Fix unstable BatchJobRecoveryTest [flink]

noorall opened a new pull request, #27057:
URL: https://github.com/apache/flink/pull/27057

   ## What is the purpose of the change
   
   Fix unstable BatchJobRecoveryTest
   
   
   ## Brief change log
   
   Avoid test failures due to task restarts after failover.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / **no** / don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / **no**)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / **not documented**)
   


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


Re: [PR] [FLINK-38272][runtime] Fix unstable BatchJobRecoveryTest [flink]

Posted by "noorall (via GitHub)" <gi...@apache.org>.
noorall commented on PR #27057:
URL: https://github.com/apache/flink/pull/27057#issuecomment-3350993574

   @zhuzhurk Thanks for your review. I've pushed a fixup commit to address your comments.


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


Re: [PR] [FLINK-38272][runtime] Fix unstable BatchJobRecoveryTest [flink]

Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #27057:
URL: https://github.com/apache/flink/pull/27057#issuecomment-3342282456

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f36e9f04c75628efdf65cdf44c7710dd604c0091",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f36e9f04c75628efdf65cdf44c7710dd604c0091",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f36e9f04c75628efdf65cdf44c7710dd604c0091 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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


Re: [PR] [FLINK-38272][runtime] Fix unstable BatchJobRecoveryTest [flink]

Posted by "zhuzhurk (via GitHub)" <gi...@apache.org>.
zhuzhurk commented on code in PR #27057:
URL: https://github.com/apache/flink/pull/27057#discussion_r2390525874


##########
flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/TestingExecutionDeploymentTrackerWrapper.java:
##########
@@ -0,0 +1,81 @@
+/*
+ * 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.jobmaster;
+
+import org.apache.flink.runtime.clusterframework.types.ResourceID;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.CompletableFuture;
+
+public class TestingExecutionDeploymentTrackerWrapper implements ExecutionDeploymentTracker {

Review Comment:
   Java docs for public Classes are required.



##########
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/adaptivebatch/BatchJobRecoveryTest.java:
##########
@@ -1212,4 +1234,45 @@ public Optional<ResourceID> storesLocalResourcesOn() {
             };
         }
     }
+
+    private void waitUntilAllExecutionsDeployed(
+            JobVertexID vertexId, AdaptiveBatchScheduler scheduler, long maxWaitMillis)
+            throws Exception {
+        checkArgument(maxWaitMillis >= 0);
+
+        // this is a poor implementation - we may want to improve it eventually

Review Comment:
   No need to introduce a timeout for this method. Test cases will timeout if not completed in time.



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


Re: [PR] [FLINK-38272][runtime] Fix unstable BatchJobRecoveryTest [flink]

Posted by "noorall (via GitHub)" <gi...@apache.org>.
noorall commented on PR #27057:
URL: https://github.com/apache/flink/pull/27057#issuecomment-3359258534

   @flinkbot run azure


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


Re: [PR] [FLINK-38272][runtime] Fix unstable BatchJobRecoveryTest [flink]

Posted by "zhuzhurk (via GitHub)" <gi...@apache.org>.
zhuzhurk commented on code in PR #27057:
URL: https://github.com/apache/flink/pull/27057#discussion_r2390545960


##########
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/adaptivebatch/BatchJobRecoveryTest.java:
##########
@@ -1212,4 +1234,45 @@ public Optional<ResourceID> storesLocalResourcesOn() {
             };
         }
     }
+
+    private void waitUntilAllExecutionsDeployed(
+            JobVertexID vertexId, AdaptiveBatchScheduler scheduler, long maxWaitMillis)
+            throws Exception {
+        checkArgument(maxWaitMillis >= 0);
+
+        // this is a poor implementation - we may want to improve it eventually

Review Comment:
   No need to introduce a timeout for this method. Flink UTs will automatically timeout if not completed in time.



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


Re: [PR] [FLINK-38272][runtime] Fix unstable BatchJobRecoveryTest [flink]

Posted by "zhuzhurk (via GitHub)" <gi...@apache.org>.
zhuzhurk merged PR #27057:
URL: https://github.com/apache/flink/pull/27057


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