Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-17117

Avoid instantiating classpath plugins when service loading plugins

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.6.0
    • None
    • connect
    • None

    Description

      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.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            gharris1727 Greg Harris

            Dates

              Created:
              Updated:

              Slack

                Issue deployment