AHeise commented on a change in pull request #11303: [FLINK-16245] Decoupling 
user classloader from context classloader.
URL: https://github.com/apache/flink/pull/11303#discussion_r393232164
 
 

 ##########
 File path: 
flink-tests/src/test/java/org/apache/flink/test/recovery/BatchFineGrainedRecoveryITCase.java
 ##########
 @@ -396,14 +397,16 @@ private TaskExecutorFailureStrategy(int 
failAfterCallNumber) {
                @Override
                void fail(int trackingIndex) throws Exception {
                        //noinspection OverlyBroadCatchBlock
-                       try {
-                               restartTaskManager();
-                       } catch (InterruptedException e) {
-                               // ignore the exception, task should have been 
failed while stopping TM
-                               Thread.currentThread().interrupt();
-                       } catch (Throwable t) {
-                               failureTracker.unrelatedFailure(t);
-                               throw t;
+                       try (TemporaryClassLoaderContext unused = 
TemporaryClassLoaderContext.of(ClassLoader.getSystemClassLoader())) {
 
 Review comment:
   The test is badly written, but I haven't found a better solution. We are 
restarting a task manager from within a UDF (with context classloader set to 
user class loader). Restarting means closing TM, which closes context class 
loader, such that starting the TM fails.

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


With regards,
Apache Git Services

Reply via email to