gharris1727 opened a new pull request, #14177:
URL: https://github.com/apache/kafka/pull/14177

   The `Classloader.registerAsParallelCapable()` call is intended to be called 
during static initialization. It must be called prior to the `Classloader` 
superconstructor, because there it is evaluated to decide whether the 
classloader instance created will be parallel capable.
   
   For the entire lifetime of this test, the 
`Classloader.registerAsParallelCapable()` call has been in an instance 
initializer, which is executed after the superconstructor is finished. This has 
meant that the first `SynchronizedDelegatingClassLoader`, and the first 
`SynchronizedPluginClassLoader` created have erroneously been 
non-parallel-capable.
   
   However, this test did not flaky-fail until #14089 was merged, because the 
`SamplingConverter` was never located in the first 
`SynchronizedPluginClassLoader`. With that PR, the 
`TestPlugins.pluginPath(TestPlugins.TestPlugin...)` function was changed to 
return a Set instead of a List. This meant that the `SamplingConverter` then 
_could_ appear in the first `SynchronizedPluginClassLoader`, and whenever that 
happened, the test would reproduce a deadlock and fail.
   
   Since there was only one `SynchronizedDelegatingClassLoader` created in this 
test, it was always non-parallel-capable. The test would only deadlock if 
_both_ classloaders were non-parallel-capable, which was not possible until 
recently.
   
   Importantly, this is only a bug in the test, as the real PluginClassLoader 
and DelegatingClassLoader have been parallel-capable since they were fixed.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


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