netudima commented on code in PR #4454:
URL: https://github.com/apache/cassandra/pull/4454#discussion_r2479568439


##########
src/java/org/apache/cassandra/service/GCInspector.java:
##########
@@ -287,23 +287,54 @@ public void handleNotification(final Notification 
notification, final Object han
                 if (state.compareAndSet(prev, new State(duration, bytes, 
prev)))
                     break;
             }
-            
-            if (getGcWarnThresholdInMs() != 0 && duration > 
getGcWarnThresholdInMs())
-                logger.warn(sb.toString());
-            else if (duration > getGcLogThresholdInMs())
-                logger.info(sb.toString());
-            else if (logger.isTraceEnabled())
-                logger.trace(sb.toString());
 
-            if (duration > this.getStatusThresholdInMs())
-                StatusLogger.log();
+            if (isConcurrentPhase(info.getGcCause(), info.getGcName()))
+            {
+                if (getGcConcurrentPhaseWarnThresholdInMs() != 0 && duration > 
getGcConcurrentPhaseWarnThresholdInMs())
+                    logger.warn(sb.toString());
+                else if (duration > getGcConcurrentPhaseLogThresholdInMs())
+                    logger.info(sb.toString());
+                else if (logger.isTraceEnabled())
+                    logger.trace(sb.toString());
+                if (duration > this.getConcurrentStatusThresholdInMs())

Review Comment:
   I would add a empty line before this line to make to improve readability - 
now it is very easy to read this part as a kind of else if but it is actually 
an independent if



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