davidradl commented on code in PR #26861:
URL: https://github.com/apache/flink/pull/26861#discussion_r2273533166


##########
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java:
##########
@@ -885,6 +850,53 @@ else if (transitionState(current, ExecutionState.FAILED, 
t)) {
         }
     }
 
+    /**
+     * Transition into our final state in case of failure. We should be either 
in DEPLOYING,
+     * INITIALIZING, RUNNING, CANCELING, or FAILED loop for multiple retries 
during concurrent state
+     * changes via calls to cancel() or to failExternally()
+     */
+    private void transitionStateOnFailure(
+            Throwable t, AutoCloseableRegistry postFailureCleanUpRegistry) 
throws IOException {
+        while (true) {
+            ExecutionState current = this.executionState;

Review Comment:
   I suggest adding a `yield()` call in the loop to prevent this thread hogging 
the cpu in a tight loop until done.  



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

Reply via email to