C0urante commented on code in PR #12817:
URL: https://github.com/apache/kafka/pull/12817#discussion_r1014046291


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerConnector.java:
##########
@@ -116,14 +115,12 @@ public void run() {
         LoggingContext.clear();
 
         try (LoggingContext loggingContext = 
LoggingContext.forConnector(connName)) {
-            ClassLoader savedLoader = Plugins.compareAndSwapLoaders(loader);

Review Comment:
   I guess one alternative could be to get the name of the connector from the 
`WorkerConnector`/`WorkerTask` object, then look up its config, then get the 
connector class out of the config, then use `Plugins::connectorLoader` to get 
the loader. But that's a bit convoluted and, if we ever want to add support for 
running multiple versions of the same connector at the same time, it'd probably 
be handy to have each `WorkerConnector`/`WorkerTask` object know its own class 
loader.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to