azagrebin commented on a change in pull request #12446:
URL: https://github.com/apache/flink/pull/12446#discussion_r435734895



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServices.java
##########
@@ -311,7 +314,12 @@ public static TaskManagerServices fromConfiguration(
                        permanentBlobService,
                        BlobLibraryCacheManager.defaultClassLoaderFactory(
                                
taskManagerServicesConfiguration.getClassLoaderResolveOrder(),
-                               
taskManagerServicesConfiguration.getAlwaysParentFirstLoaderPatterns()));
+                               
taskManagerServicesConfiguration.getAlwaysParentFirstLoaderPatterns(),
+                               classLoadingException -> {
+                                       if 
(ExceptionUtils.isMetaspaceOutOfMemoryError(classLoadingException)) {
+                                               
fatalErrorHandler.onFatalError(classLoadingException);
+                                       }

Review comment:
       I thought we agreed that we wanted to try a graceful TM shutdown with 
reporting to JM before the JVM fatal exit. This will be also not flexible 
enough to behave differently in JM (related to the previous comment). If we 
want to have only one way of handling then indeed it can be simplified.




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