netudima commented on code in PR #4433:
URL: https://github.com/apache/cassandra/pull/4433#discussion_r2466466827
##########
src/java/org/apache/cassandra/service/GCInspector.java:
##########
@@ -287,23 +287,53 @@ 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());
+ // TODO: trigger StatusLogger if concurrent phases take too
long?
Review Comment:
regarding the TODO, yes, I think it makes sense to do a symmetric logic: too
long GC can steal some computation resources from request processing and it
maybe helpful to flush stats to see a possible impact.
Note: the threshold for status logging should be correspondent (based on
concurrent phase log thresholds)
--
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]