Copilot commented on code in PR #4916:
URL: https://github.com/apache/cassandra/pull/4916#discussion_r3533410416


##########
src/java/org/apache/cassandra/utils/JVMStabilityInspector.java:
##########
@@ -200,7 +200,7 @@ private static void forceHeapSpaceOomMaybe(OutOfMemoryError 
oom)
     {
         if (FORCE_HEAP_OOM_IGNORE_SET.contains(oom.getMessage()))
             return;
-        logger.error("Force heap space OutOfMemoryError in the presence of", 
oom);
+        logger.error("Off-heap OutOfMemoryError detected, forcing a heap 
OutOfMemoryError to trigger standard JVM OOM handling:", oom);

Review Comment:
   This log message asserts an off-heap OOM, but `forceHeapSpaceOomMaybe()` is 
invoked for *any* `OutOfMemoryError` (see call at line 130) and only filters 
out two specific messages via `FORCE_HEAP_OOM_IGNORE_SET`. For other OOM 
variants (e.g. non-"Java heap space" heap OOMs), this would misleadingly label 
the event as off-heap and can misdirect operators.
   
   Consider wording the log so it does not claim off-heap unless the predicate 
actually checks for an off-heap OOM (or expand the predicate accordingly).



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