Greg Harris created KAFKA-17117:
-----------------------------------
Summary: Avoid instantiating classpath plugins when service
loading plugins
Key: KAFKA-17117
URL: https://issues.apache.org/jira/browse/KAFKA-17117
Project: Kafka
Issue Type: Improvement
Components: connect
Affects Versions: 3.6.0
Reporter: Greg Harris
In KAFKA-14789 modifications were made to allow PluginClassLoaders to see all
resource files of the parent DelegatingClassLoader and classpath, rather than
selectively hiding some resources that were for ServiceLoader manifests.
This has the effect that the ServiceLoader finds classpath plugins when
searching in plugin locations, and the PluginScanner filters these plugins out
by checking for classloader equality.
This has some side-effects that are undesirable:
* Classpath plugins may be instantiated with the thread context classloader
set to a plugin classloader
* Classpath plugins are instantiated multiple times, once for each plugin
location
* Exceptions from classpath plugins show up multiple times in the logs:
KAFKA-17111
This change may require us to fork the ServiceLoader implementation, which is
itself undesirable.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)