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



##########
File path: 
flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java
##########
@@ -110,6 +110,14 @@
                        " resolved through the parent ClassLoader first. A 
pattern is a simple prefix that is checked against" +
                        " the fully qualified class name. These patterns are 
appended to \"" + ALWAYS_PARENT_FIRST_LOADER_PATTERNS.key() + "\".");
 
+       @Documentation.Section(Documentation.Sections.EXPERT_CLASS_LOADING)
+       public static final ConfigOption<Boolean> 
FAIL_USER_CLASS_LOADING_METASPACE_OOM = ConfigOptions
+               .key("classloader.fail.on.metaspace.oom.error")
+               .booleanType()
+               .defaultValue(true)
+               .withDescription("Sets whether to fail and exit TaskManager JVM 
process if 'OutOfMemoryError: Metaspace' is " +
+                       "thrown trying to load a user code class.");

Review comment:
       I would remove the reference to `user code` in the description and field 
name since this change also applies to plugins.

##########
File path: 
flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java
##########
@@ -110,6 +110,14 @@
                        " resolved through the parent ClassLoader first. A 
pattern is a simple prefix that is checked against" +
                        " the fully qualified class name. These patterns are 
appended to \"" + ALWAYS_PARENT_FIRST_LOADER_PATTERNS.key() + "\".");
 
+       @Documentation.Section(Documentation.Sections.EXPERT_CLASS_LOADING)
+       public static final ConfigOption<Boolean> 
FAIL_USER_CLASS_LOADING_METASPACE_OOM = ConfigOptions
+               .key("classloader.fail.on.metaspace.oom.error")
+               .booleanType()
+               .defaultValue(true)
+               .withDescription("Sets whether to fail and exit TaskManager JVM 
process if 'OutOfMemoryError: Metaspace' is " +
+                       "thrown trying to load a user code class.");

Review comment:
       Nevermind, turns out the plugin system has its own custom class loader, 
and is thus unaffected by this change.




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