[ https://issues.apache.org/jira/browse/CASSANDRA-11713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15274370#comment-15274370 ]
Joshua McKenzie commented on CASSANDRA-11713: --------------------------------------------- * Throwing RTE in SEPExecutor.ctor on failure to registerMBean changes this from an optional feature to an optional feature with mandatory infrastructure / registration demands. I'd recommend logging a warning instead of killing the executor. This will also necessitate a change to confirming registration succeeded and skip the thread dump if not. * Rather than having ThreadDumper be a static set of methods, you could make this an instance variable member of SEPExecutor and encapsulate the initialization, check if init, and also CAS inside the member class and keep that functionality separate from SEPExecutor. * .get() on the AtomicBoolean in SEPExecutor.addTask gives you the possibility of multiple tasks printing a dump during heavy contention. I recommend pushing the CAS up to where the .get() check is, with the caveat that I more strongly recommend encapsulating that logic inside an instance class (see above) > Add ability to log thread dump when NTR pool is blocked > ------------------------------------------------------- > > Key: CASSANDRA-11713 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11713 > Project: Cassandra > Issue Type: Improvement > Components: Observability > Reporter: Paulo Motta > Assignee: Paulo Motta > Priority: Minor > > Thread dumps are very useful for troubleshooting Native-Transport-Requests > contention issues like CASSANDRA-11363 and CASSANDRA-11529. > While they could be generated externally with {{jstack}}, sometimes the > conditions are transient and it's hard to catch the exact moment when they > happen, so it could be useful to generate and log them upon user request when > certain internal condition happens. > I propose adding a {{logThreadDumpOnNextContention}} flag to {{SEPExecutor}} > that when enabled via JMX generates and logs a single thread dump on the > system log when the thread pool queue is full. -- This message was sent by Atlassian JIRA (v6.3.4#6332)