nzw921rx commented on PR #10678:
URL: https://github.com/apache/seatunnel/pull/10678#issuecomment-4167567598
@knight6236 good job
The deep clean methods (`clearUrlClassPathCache()`,
`clearJarFileFactoryCache()`, `closeJarLoader()`) are guarded by the
`SEATUNNEL_CLASSLOADER_DEEP_CLEAN=true` flag — they only execute when the user
has **explicitly opted in**.
Given this explicit intent, failures in the cleanup process should be
surfaced to the user rather than hidden. However, the current implementation
logs all errors at `DEBUG` level or swallows them silently:
| Method | Line | Current Behavior |
|--------|------|------------------|
| `clearUrlClassPathCache()` | 298 | `log.debug("Failed to clear
URLClassPath cache ...")` |
| `closeJarLoader()` | 320 | `catch (Exception ignored) {}` — no logging at
all |
| `closeJarLoader()` | 323 | `log.debug("Failed to close JarLoader: ...")` |
| `clearJarFileFactoryCache()` | 350 | `log.debug("Failed to parse URL for
deep clean: ...")` |
| `clearJarFileFactoryCache()` | 379 | `log.debug("Failed to close JarFile:
...")` |
| `clearJarFileFactoryCache()` | 410 | `log.debug("JarFileFactory class not
found ...")` |
| `clearJarFileFactoryCache()` | 412 | `log.debug("Failed to clear
JarFileFactory cache ...")` |
Since most production deployments use the default `INFO` log level, none of
these failures will appear in the logs. This creates a false sense of success —
the user believes the deep clean is working, but it may be silently failing due
to missing `--add-opens` JVM options or other environmental issues.
**Suggestion:** Elevate all failure logs in the deep clean path to **WARN**
level at minimum. This ensures that when a user explicitly enables deep clean,
any issues are immediately visible and actionable without requiring a log level
change.
--
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]