ChengbingLiu commented on code in PR #5215: URL: https://github.com/apache/hadoop/pull/5215#discussion_r1047964506
########## hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/log/LogThrottlingHelper.java: ########## @@ -262,8 +263,15 @@ public LogAction record(String recorderName, long currentTimeMs, if (primaryRecorderName.equals(recorderName) && currentTimeMs - minLogPeriodMs >= lastLogTimestampMs) { lastLogTimestampMs = currentTimeMs; - for (LoggingAction log : currentLogs.values()) { - log.setShouldLog(); + for (Iterator<LoggingAction> it = currentLogs.values().iterator(); it + .hasNext();) { + LoggingAction log = it.next(); + if (log.hasLogged()) { + // Make sure the dependent recorders will be triggered the next time + it.remove(); + } else { + log.setShouldLog(); + } } Review Comment: Makes sense. Added a new commit according to your suggestions. -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org