liuisaac opened a new pull request, #4916:
URL: https://github.com/apache/cassandra/pull/4916

   Issue: 
[CASSANDRA-19831](https://issues.apache.org/jira/browse/CASSANDRA-19831)
   
   ### Purpose
   
   Clarifies the warning message printed by `JVMStabilityInspector.java` when 
an off-heap OutOfMemoryError triggers a forced heap space crash.
   
   ### Context
   
   `JVMStabilityInspector.forceHeapSpaceOomMaybe` acts as a killswitch in the 
case of an off-heap OOM (ie: `java.lang.OutOfMemoryError: Direct buffer 
memory`), forcing a standard Java heap OOM 
([CASSANDRA-15214](https://issues.apache.org/jira/browse/CASSANDRA-15214) and 
[CASSANDRA-17128](https://issues.apache.org/jira/browse/CASSANDRA-17128)).
   
   ### Problem
   
   Previous log string read: 
   
   ```java
   logger.error("Force heap space OutOfMemoryError in the presence of", oom);
   ```
   
   The log begins with "Force heap space OutOfMemoryError," which seems to 
suggest a heap issue rather than off-heap where this log is triggered. This 
choice of phrasing can confuse operators, who may respond by mistakenly 
increasing allocation to Java heap.
   
   ### Solution
   
   Updated the logging output to lead with:
   
   ```java
   logger.error("Off-heap OOM forcing heap space OutOfMemoryError after 
OutOfMemoryError:", oom);
   ``` 
   
   This wording makes it immediately clear that the OOM occurs off-heap. This 
should make off-heap OOMs less confusing as the error log is more direct in 
what has caused the error.
   


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