gharris1727 commented on code in PR #16984:
URL: https://github.com/apache/kafka/pull/16984#discussion_r1871780784


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/Plugins.java:
##########
@@ -240,6 +261,21 @@ public Runnable withClassLoader(ClassLoader classLoader, 
Runnable operation) {
         };
     }
 
+    public static LoaderSwap swapLoader(ClassLoader loader) {

Review Comment:
   So far the Worker has maintained the Plugins instance, and the WorkerTask 
has maintained the ClassLoader instance, allowing 
`plugins.swapLoader(task.loader())` to be called when necessary.
   
   > pass the plugins instance to the WorkerTasks which seems overkill
   
   I think this is the best way forward.



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

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to