xkrogen commented on code in PR #5246: URL: https://github.com/apache/hadoop/pull/5246#discussion_r1053850133
########## hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/log/LogThrottlingHelper.java: ########## @@ -259,6 +259,10 @@ public LogAction record(String recorderName, long currentTimeMs, currentLogs.put(recorderName, currentLog); } currentLog.recordValues(values); + if (currentTimeMs < lastLogTimestampMs) { + // Reset lastLogTimestampMs: this should only happen in tests + lastLogTimestampMs = Long.MIN_VALUE; + } Review Comment: This is a bit awkward. How about instead we add a new method like `reset()` that clears all of the state? -- 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