xintongsong commented on a change in pull request #11323:
URL: https://github.com/apache/flink/pull/11323#discussion_r414277526



##########
File path: 
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/KubernetesResourceManager.java
##########
@@ -320,5 +333,16 @@ private void internalStopPod(String podName) {
                                        }
                                }
                        );
+
+               final KubernetesWorkerNode kubernetesWorkerNode = 
workerNodes.remove(resourceId);
+               final WorkerResourceSpec workerResourceSpec = 
podWorkerResources.remove(podName);
+
+               // If the stopped pod is requested in the current attempt 
(workerResourceSpec is known) and is not yet added,
+               // we need to notify ActiveResourceManager to decrease the 
pending worker count.
+               if (workerResourceSpec != null && kubernetesWorkerNode == null) 
{

Review comment:
       With `requestKubernetesPodIfRequired` now tries to request pods for all 
the `workerResourceSpec`s, there's not much differences between in failure 
handling of started/recovered pods. The only difference is whether we decrease 
the `pendingWorkerCounter` or not.




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