Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-26048 [JDK17] Replace the usage of deprecated API ThreadGroup.d… #5913

Merged
merged 1 commit into from
May 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -735,14 +735,11 @@ public void join() {
Thread.currentThread().interrupt();
}

// Destroy the Thread Group for the executors
// TODO: Fix. #join is not place to destroy resources.
try {
threadGroup.destroy();
} catch (IllegalThreadStateException e) {
LOG.error("ThreadGroup {} contains running threads; {}: See STDOUT", this.threadGroup, e);
// This dumps list of threads on STDOUT.
this.threadGroup.list();
// log the still active threads, ThreadGroup.destroy is deprecated in JDK17 and it is not
// necessary for us to must destroy it here, so we just do a check and log
if (threadGroup.activeCount() > 0) {
LOG.error("There are still active thread in group {}, see STDOUT", threadGroup);
threadGroup.list();
}

// reset the in-memory state for testing
Expand Down