[MINOR][CI] Make federated client and monitoring threads daemon#2508
Merged
Conversation
Several federated Netty event-loop groups and a monitoring stats pool used non-daemon threads, which can keep a surefire test fork JVM alive after its tests complete and stall the job until the GitHub Actions timeout. This is the same class of leak addressed for the server-side worker and common thread pools, applied to the remaining sources: - FederatedData (client/coordinator): the lazily-created NioEventLoopGroup used non-daemon threads and is only torn down via clearWorkGroup(), whose shutdownGracefully() is asynchronous and shared across concurrently running coordinator tests. A missed cleanup or in-flight shutdown left a non-daemon event loop running indefinitely (no idle expiry), hanging the data.misc/ lineage fork. Create it with a daemon thread factory like the worker side. - FederatedMonitoringServer: boss/worker event-loop groups now use a daemon thread factory, preserving the default thread count. - WorkerService: the scheduled stats-collection pool is never shut down and runs a fixed-rate task forever; make its threads daemon so it cannot block JVM exit. Graceful shutdown remains the normal path; daemon threads ensure a leaked or in-flight group can never block fork/JVM exit.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2508 +/- ##
============================================
- Coverage 71.56% 71.54% -0.03%
+ Complexity 49052 49034 -18
============================================
Files 1574 1574
Lines 189565 189570 +5
Branches 37188 37188
============================================
- Hits 135658 135622 -36
- Misses 43422 43466 +44
+ Partials 10485 10482 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes intermittent
data.misc/lineageJava test forks hanging until the 30-minute GitHub Actions job timeout. All test classes complete, but the fork JVM cannot exit because of leaked non-daemon threads in the federated stack, the same class of issue as #2488/#2502, applied to the remaining sources.