dcapwell commented on code in PR #4220:
URL: https://github.com/apache/cassandra/pull/4220#discussion_r2226827153


##########
test/simulator/main/org/apache/cassandra/simulator/systems/InterceptibleThreadFactory.java:
##########
@@ -58,7 +58,9 @@ public InterceptibleThread newThread(Runnable runnable)
         @Override
         protected synchronized InterceptibleThread newThread(ThreadGroup 
threadGroup, Runnable runnable, String name)
         {
-            InterceptibleThread thread = new InterceptibleThread(threadGroup, 
runnable, name, extraToStringInfo, onTermination, 
parent.interceptorOfGlobalMethods, time);
+            // Can not use NamedThreadFactory.globalPrefix() as this method 
runs in the App class loader and not the Instance class loader; the 
ThreadGroup's name can act as a proxy for this.
+            String threadName = threadGroup.getName() + '_' + name;

Review Comment:
   looking and the best i see is creating a annoying plugin for logback that 
has to be linked in the config as well, so would need a java plugin we write + 
config changes.
   
   having the thread name prefixed with the node is what we do in jvm-dtest and 
you can find tests leverage this behavior.  Its also be really great when 
taking stack traces when things go wrong, or collecting stack dumps.  For 
example we see that simulator keeps failing in CI due to leaked threads... but 
from which nodes?  Does thread X relate to thread Y or is it from a different 
node?



-- 
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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to