cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua McKenzie (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-11713) Add ability to log thread dump when NTR pool is blocked
Date Fri, 06 May 2016 17:13:13 GMT


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:
>             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

View raw message