wangyang0918 commented on a change in pull request #14837:
URL: https://github.com/apache/flink/pull/14837#discussion_r571645675



##########
File path: 
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/KubernetesResourceManagerDriver.java
##########
@@ -359,8 +363,17 @@ public void onError(List<KubernetesPod> pods) {
         }
 
         @Override
-        public void handleFatalError(Throwable throwable) {
-            getResourceEventHandler().onError(throwable);
+        public void handleError(Throwable throwable) {
+            if (throwable instanceof KubernetesTooOldResourceVersionException) 
{
+                getMainThreadExecutor()
+                        .execute(
+                                () -> {
+                                    log.info("Creating a new watch on 
TaskManager pods.");
+                                    podsWatchOpt = watchTaskManagerPods();

Review comment:
       It might be better if we could release the resources(e.g. websocket, 
executors) before the JobManager process exits.




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