ChengbingLiu opened a new pull request, #5215: URL: https://github.com/apache/hadoop/pull/5215
### Description of PR The current implementation of `LogThrottlingHelper` works well most of the time, but it missed out one case, which appears quite common in the production codes: - if the dependent recorder was not suppressed before the primary one is triggered on the next period, then the next logging of the dependent recorder will be unexpectedly suppressed. ``` helper = new LogThrottlingHelper(LOG_PERIOD, "foo", timer); assertTrue(helper.record("foo", 0).shouldLog()); assertTrue(helper.record("bar", 0).shouldLog()); // Both should log once the period has elapsed // <pos1> assertTrue(helper.record("foo", LOG_PERIOD).shouldLog()); assertTrue(helper.record("bar", LOG_PERIOD).shouldLog()); <--- This assertion will now fail ``` Note if we call `helper.record("bar", LOG_PERIOD * 2)` at `<pos1>`, as the existing test cases do, it will work as expected. ### How was this patch tested? A test case is added. -- 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