You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "DanielLeens (via GitHub)" <gi...@apache.org> on 2026/04/06 10:06:56 UTC

Re: [PR] [Improve][Engine] Introduce opt-in ClassLoader deep clean and prepare lifecycle hooks for explicit close (Phase 3) [seatunnel]

DanielLeens commented on PR #10678:
URL: https://github.com/apache/seatunnel/pull/10678#issuecomment-4191584663

   @knight6236 Thanks for clarifying the scope. With the updated title/body/acceptance criteria, I agree the first issue is now represented more honestly: this PR prepares the call sites and keeps the default behavior unchanged.
   
   I still do not think the second issue is resolved enough for merge, though. The problem is not only that the risk is now documented; the opt-in deep-clean path is still unsafe in the current implementation.
   
   `getClassLoader()` / `releaseClassLoader()` track ownership by `jobId + jars key` (`DefaultClassLoaderService.java:90-159`), but `clearJarFileFactoryCache()` still removes JVM-global cache entries purely by canonical JAR path (`DefaultClassLoaderService.java:365-435`). So if Job A and Job B use different classloaders over the same physical plugin JARs, Job A can still tear down the shared `JarFileFactory` entries while Job B is alive. That is a behavioral hazard in the code path itself, not just a documentation caveat.
   
   For this phase, I would be comfortable if we narrow the implementation as well as the description, for example by keeping the lifecycle wiring / opt-in scaffolding but dropping the `JarFileFactory` global-cache mutation until the process-wide JAR-path ownership model from Phase 3 actually exists. Right now the PR text is more accurate, but the deep-clean branch still looks too risky to merge.


-- 
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: commits-unsubscribe@seatunnel.apache.org

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