isaacreath commented on code in PR #4419:
URL: https://github.com/apache/cassandra/pull/4419#discussion_r2422006605


##########
src/java/org/apache/cassandra/utils/JVMStabilityInspector.java:
##########
@@ -136,7 +136,20 @@ else if (t instanceof UnrecoverableIllegalStateException)
         }
 
         // Anything other than an OOM, we should try and heap dump to capture 
what's going on if configured to do so
-        HeapUtils.maybeCreateHeapDump();
+        if (isUncaughtException)
+        {
+            try
+            {
+                if (DatabaseDescriptor.getDumpHeapOnUncaughtException())

Review Comment:
   A comment could be helpful here so it's clear why we check 
`DatabaseDescriptor.getDumpHeapOnUncaughtException()` outside of 
`HeapUtils.maybeCreateHeapDump` so that nobody accidentally deletes this check 
thinking it's redundant. 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to