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

Support to generate thread dump in a file #604

Merged
merged 1 commit into from
Feb 28, 2022

Conversation

diegolovison
Copy link
Contributor

JGroups generate thread dump in the same log of the server. When dealing with suspected nodes, the logs become big and it is hard to find out the root cause.

This PR allows the developer to set a custom path to generate the thread dump.

@@ -171,10 +176,26 @@ public boolean execute(Runnable task) {
catch(RejectedExecutionException ex) {
tp.getMessageStats().incrNumRejectedMsgs(1);
// https://issues.redhat.com/browse/JGRP-2403
String threadDump = Util.dumpThreads();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This org.jgroups.util.Util#dumpThreads call is in the wrong place. It is expensive so make sure to call it at the code path you are certainly going to use the result.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ops. Thanks!

belaban added a commit that referenced this pull request Feb 28, 2022
@belaban belaban merged commit d293230 into belaban:master Feb 28, 2022
@belaban
Copy link
Owner

belaban commented Feb 28, 2022

Applied; it would be nice to have an associated JIRA.
Cheers

@diegolovison
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants