rishabhdaim opened a new pull request, #3193: URL: https://github.com/apache/jackrabbit-oak/pull/3193
Running multiple oak-run commands in one JVM can leave a Logback configuration scanner alive after shutdown. Once `oak.workDir` is restored or removed, that scanner can reload the configuration and create `oak.workDir_IS_UNDEFINED/indexing.log` outside the build directory, failing RAT. Restart a stopped logging context after successful configuration so the next shutdown closes its file appenders and cancels its scanners. The production change is three lines. Four regression tests cover repeated initialization/shutdown, initialization without reset, and the existing custom-configuration opt-out. The regression was exposed by [50bde7adad](https://github.com/apache/jackrabbit-oak/commit/50bde7adad3c8361447f5e06ce32413e8776d8e6) (OAK-10339, September 29), which upgraded Logback 1.2.13 to 1.6.4. `LoggingInitializer` is unchanged across that commit. The old Logback always cleaned up on `stop()`; the new version returns immediately for a stopped context. Oak reconfigured that stopped context without restarting it. Validation on Java 17: - The unchanged Oak code cancels the scanner with Logback 1.2.13, leaves it running with 1.6.4, and cancels it again with this fix. - Three of the four new tests fail before the fix; all four pass afterwards. - The full `oak-run-commons` unit suite passes: 247 tests, zero failures/errors, one existing skip. - Packaging and RAT pass with zero unapproved files. - The direct reproduction creates the stray log before the fix and does not create it afterwards. [Jira: OAK-12439](https://issues.apache.org/jira/browse/OAK-12439) ยท [Affected CI run on #3185](https://github.com/apache/jackrabbit-oak/actions/runs/37422282668/job/112134394437) This is a separate fix for existing logging behavior; it does not change cache maintenance modes. Co-Authored-By: OpenAI Codex <[email protected]> -- 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]
