joerghoh commented on code in PR #5:
URL:
https://github.com/apache/sling-org-apache-sling-commons-threads/pull/5#discussion_r1285052784
##########
src/main/java/org/apache/sling/commons/threads/impl/ThreadPoolExecutorCleaningThreadLocals.java:
##########
@@ -68,8 +69,14 @@ protected void afterExecute(Runnable r, Throwable t) {
if (cleaner != null) {
cleaner.cleanup();
+ this.cleanupCounter++;
Review Comment:
This is called unconditionally, that means it will increment the counter
even if not cleanup was required. I would suggest (SLING-11149 is not totally
clear in this case) to just count the number of occurrences when a cleanup was
actually doing work and releasing ThreadLocals. Then this counter is a useful
metric, because any value != 0 will hint to a problem in cleanup (on an
application side).
--
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]