Skip to content

Fixed the race condition: removed premature runHotkeyReaderThread() call before watchFiles() - #2073

Open
sajeerzeji wants to merge 1 commit into
OpenLiberty:mainfrom
sajeerzeji:GHLMP2070-Fix_race_condition_in_DevMojo_doDevMode
Open

Fixed the race condition: removed premature runHotkeyReaderThread() call before watchFiles()#2073
sajeerzeji wants to merge 1 commit into
OpenLiberty:mainfrom
sajeerzeji:GHLMP2070-Fix_race_condition_in_DevMojo_doDevMode

Conversation

@sajeerzeji

@sajeerzeji sajeerzeji commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Fixes #2070

PR Ci.Common: OpenLiberty/ci.common#526
PR Ci.Gradle: OpenLiberty/ci.gradle#1095

As a part of this PR OpenLiberty/ci.common#526 we mad ci.common print the "Liberty is running in dev mode." startup banner from inside watchFiles() after all directories are registered with the WatchService, the explicit util.runHotkeyReaderThread(executor) call that DevMojo.doDevMode() made between startServer() and watchFiles() is no longer needed and has been removed. That call was the source of the race condition described in the issue, it caused the ready message to fire before the WatchService had registered any source directories, making it an unreliable signal for tests and users. The early hotkey reader thread is still started via startEarlyHotkeyReader() before server startup to allow quitting during startup, and the post-test-run re-print from the finally block inside the watch loop remains unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix race condition in DevMojo.doDevMode()

1 participant